chore(oas): fix Get Variant's Inventory OAS (#4856)
* chore(oas): fix Get Variant's Inventory OAS * fix the curl example
This commit is contained in:
@@ -29,14 +29,14 @@ import { joinLevels } from "../inventory-items/utils/join-levels"
|
|||||||
* import Medusa from "@medusajs/medusa-js"
|
* import Medusa from "@medusajs/medusa-js"
|
||||||
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
* // must be previously logged in or use api token
|
* // must be previously logged in or use api token
|
||||||
* medusa.admin.variants.list()
|
* medusa.admin.variants.getInventory(variantId)
|
||||||
* .then(({ variants, limit, offset, count }) => {
|
* .then(({ variant }) => {
|
||||||
* console.log(variants.length)
|
* console.log(variant.inventory, variant.sales_channel_availability)
|
||||||
* })
|
* })
|
||||||
* - lang: Shell
|
* - lang: Shell
|
||||||
* label: cURL
|
* label: cURL
|
||||||
* source: |
|
* source: |
|
||||||
* curl '{backend_url}/admin/variants' \
|
* curl '{backend_url}/admin/variants/{id}/inventory' \
|
||||||
* -H 'Authorization: Bearer {api_token}'
|
* -H 'Authorization: Bearer {api_token}'
|
||||||
* security:
|
* security:
|
||||||
* - api_token: []
|
* - api_token: []
|
||||||
@@ -49,11 +49,7 @@ import { joinLevels } from "../inventory-items/utils/join-levels"
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminGetVariantsVariantInventoryRes"
|
||||||
* properties:
|
|
||||||
* variant:
|
|
||||||
* type: object
|
|
||||||
* $ref: "#/components/schemas/AdminGetVariantsVariantInventoryRes"
|
|
||||||
* "400":
|
* "400":
|
||||||
* $ref: "#/components/responses/400_error"
|
* $ref: "#/components/responses/400_error"
|
||||||
* "401":
|
* "401":
|
||||||
|
|||||||
Reference in New Issue
Block a user