chore(oas): general fixes to OAS (#9413)

General fixes to OAS
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-10-02 15:21:40 +00:00
1 parent 34eebb61eb
commit 5fb9c1f82e
9 files changed
+51 -17

No files matched your search

@@ -37,14 +37,10 @@
* "email": "admin@medusa-test.com", * "email": "admin@medusa-test.com",
* "password": "supersecret" * "password": "supersecret"
* }' * }'
* - lang: Shell * - lang: Bash
* label: Google Provider * label: Google Provider
* source: |- * source: |-
* curl -X POST '{backend_url}/auth/user/google' * curl -X POST '{backend_url}/auth/user/google'
* - lang: Shell
* label: GitHub Provider
* source: |-
* curl -X POST '{backend_url}/auth/user/github'
* tags: * tags:
* - Auth * - Auth
* responses: * responses:
@@ -27,7 +27,7 @@
* - lang: Shell * - lang: Shell
* label: Google Provider * label: Google Provider
* source: curl -X POST '{backend_url}/auth/user/google/callback?code=123' * source: curl -X POST '{backend_url}/auth/user/google/callback?code=123'
* - lang: Shell * - lang: Bash
* label: GitHub Provider * label: GitHub Provider
* source: curl -X POST '{backend_url}/auth/user/github/callback?code=123' * source: curl -X POST '{backend_url}/auth/user/github/callback?code=123'
* tags: * tags:
@@ -37,14 +37,10 @@
* "email": "customer@gmail.com", * "email": "customer@gmail.com",
* "password": "supersecret" * "password": "supersecret"
* }' * }'
* - lang: Shell * - lang: Bash
* label: Google Provider * label: Google Provider
* source: |- * source: |-
* curl -X POST '{backend_url}/auth/customer/google' * curl -X POST '{backend_url}/auth/customer/google'
* - lang: Shell
* label: GitHub Provider
* source: |-
* curl -X POST '{backend_url}/auth/customer/github'
* tags: * tags:
* - Auth * - Auth
* responses: * responses:
@@ -27,7 +27,7 @@
* - lang: Shell * - lang: Shell
* label: Google Provider * label: Google Provider
* source: curl -X POST '{backend_url}/auth/customer/google/callback?code=123' * source: curl -X POST '{backend_url}/auth/customer/google/callback?code=123'
* - lang: Shell * - lang: Bash
* label: GitHub Provider * label: GitHub Provider
* source: curl -X POST '{backend_url}/auth/customer/github/callback?code=123' * source: curl -X POST '{backend_url}/auth/customer/github/callback?code=123'
* tags: * tags:
@@ -32,6 +32,8 @@
* title: fields * title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields.
* externalDocs:
* url: "#select-fields-and-relations"
* x-codeSamples: * x-codeSamples:
* - lang: Shell * - lang: Shell
* label: cURL * label: cURL
@@ -56,7 +58,7 @@
* type: * type:
* type: string * type: string
* title: type * title: type
* description: The type of the returned object. * description: The type of the returned object. In this case, the order is returned because the cart was completed successfully.
* default: order * default: order
* order: * order:
* $ref: "#/components/schemas/StoreOrder" * $ref: "#/components/schemas/StoreOrder"
@@ -70,7 +72,7 @@
* type: * type:
* type: string * type: string
* title: type * title: type
* description: The type of the returned object. * description: The type of the returned object. In this case, the cart is returned because an error has occurred.
* default: cart * default: cart
* cart: * cart:
* $ref: "#/components/schemas/StoreCart" * $ref: "#/components/schemas/StoreCart"
@@ -51,7 +51,7 @@
* description: Any additional data relevant for the third-party fulfillment provider to process the shipment. * description: Any additional data relevant for the third-party fulfillment provider to process the shipment.
* externalDocs: * externalDocs:
* url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping#data-request-body-parameter * url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping#data-request-body-parameter
* description: Learn more about the `data` parameter. * description: Learn more about the data parameter.
* x-codeSamples: * x-codeSamples:
* - lang: Shell * - lang: Shell
* label: cURL * label: cURL
@@ -6,7 +6,7 @@
* required: * required:
* - location * - location
* properties: * properties:
* token: * location:
* type: string * type: string
* title: location * title: location
* description: The location to redirect the user to for further authentication with the third-party provider. * description: The location to redirect the user to for further authentication with the third-party provider.
@@ -1,7 +1,7 @@
/** /**
* @schema BaseRegion * @schema BaseRegion
* type: object * type: object
* description: The parent's region. * description: The region's details.
* x-schemaName: BaseRegion * x-schemaName: BaseRegion
* required: * required:
* - id * - id
@@ -37,6 +37,46 @@ class SchemaFactory {
BigNumberValue: { BigNumberValue: {
type: "number", type: "number",
}, },
expand: {
type: "string",
title: "expand",
description:
"Comma-separated relations that should be expanded in the returned data.",
},
fields: {
type: "string",
title: "fields",
description:
"Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields.",
externalDocs: {
url: "#select-fields-and-relations",
},
},
offset: {
type: "number",
title: "offset",
description: "The number of items to skip when retrieving a list.",
externalDocs: {
url: "#pagination",
},
},
limit: {
type: "number",
title: "limit",
description: "Limit the number of items returned in the list.",
externalDocs: {
url: "#pagination",
},
},
order: {
type: "string",
title: "order",
description:
"The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.",
externalDocs: {
url: "#pagination",
},
},
File: { File: {
type: "object", type: "object",
description: "A File to upload.", description: "A File to upload.",