chore(oas): [14/n] improve OAS schemas (#9202)

* chore(oas): [14/n] improve OAS schemas

* fix description of required_quantity
This commit is contained in:
Shahed Nasser
2024-09-19 18:52:46 +02:00
committed by GitHub
parent d6ce0688db
commit 426c39c04b
20 changed files with 133 additions and 281 deletions
@@ -1,53 +1,53 @@
/**
* @schema AdminUpdateProduct
* type: object
* description: The update's details.
* description: The product's details.
* x-schemaName: AdminUpdateProduct
* properties:
* title:
* type: string
* title: title
* description: The update's title.
* description: The product's title.
* subtitle:
* type: string
* title: subtitle
* description: The update's subtitle.
* description: The product's subtitle.
* description:
* type: string
* title: description
* description: The update's description.
* description: The product's description.
* is_giftcard:
* type: boolean
* title: is_giftcard
* description: The update's is giftcard.
* description: Whether the product is a gift card.
* discountable:
* type: boolean
* title: discountable
* description: The update's discountable.
* description: Whether discounts can be applied on the product.
* images:
* type: array
* description: The update's images.
* description: The product's images.
* items:
* type: object
* description: The image's images.
* description: The image's details.
* required:
* - url
* properties:
* url:
* type: string
* title: url
* description: The image's url.
* description: The image's URL.
* thumbnail:
* type: string
* title: thumbnail
* description: The update's thumbnail.
* description: The product's thumbnail URL.
* handle:
* type: string
* title: handle
* description: The update's handle.
* description: The product's unique handle.
* status:
* type: string
* description: The update's status.
* description: The product's status.
* enum:
* - draft
* - proposed
@@ -56,17 +56,17 @@
* type_id:
* type: string
* title: type_id
* description: The update's type id.
* description: The ID of the product's type.
* collection_id:
* type: string
* title: collection_id
* description: The update's collection id.
* description: The ID of the product's collection.
* categories:
* type: array
* description: The update's categories.
* description: The product's categories.
* items:
* type: object
* description: The category's categories.
* description: The product's category.
* required:
* - id
* properties:
@@ -76,10 +76,10 @@
* description: The category's ID.
* tags:
* type: array
* description: The update's tags.
* description: The product's tags.
* items:
* type: object
* description: The tag's tags.
* description: The product's tag.
* required:
* - id
* properties:
@@ -89,181 +89,22 @@
* description: The tag's ID.
* options:
* type: array
* description: The update's options.
* description: The product's options.
* items:
* $ref: "#/components/schemas/AdminUpdateProductOption"
* variants:
* type: array
* description: The update's variants.
* description: The product's variants. You can add new variants or update existing ones, passing their IDs in the object.
* items:
* oneOf:
* - type: object
* description: The variant's variants.
* x-schemaName: AdminCreateProductVariant
* required:
* - title
* - prices
* properties:
* title:
* type: string
* title: title
* description: The variant's title.
* sku:
* type: string
* title: sku
* description: The variant's sku.
* ean:
* type: string
* title: ean
* description: The variant's ean.
* upc:
* type: string
* title: upc
* description: The variant's upc.
* barcode:
* type: string
* title: barcode
* description: The variant's barcode.
* hs_code:
* type: string
* title: hs_code
* description: The variant's hs code.
* mid_code:
* type: string
* title: mid_code
* description: The variant's mid code.
* allow_backorder:
* type: boolean
* title: allow_backorder
* description: The variant's allow backorder.
* manage_inventory:
* type: boolean
* title: manage_inventory
* description: The variant's manage inventory.
* variant_rank:
* type: number
* title: variant_rank
* description: The variant's variant rank.
* weight:
* type: number
* title: weight
* description: The variant's weight.
* length:
* type: number
* title: length
* description: The variant's length.
* height:
* type: number
* title: height
* description: The variant's height.
* width:
* type: number
* title: width
* description: The variant's width.
* origin_country:
* type: string
* title: origin_country
* description: The variant's origin country.
* material:
* type: string
* title: material
* description: The variant's material.
* metadata:
* type: object
* description: The variant's metadata.
* prices:
* type: array
* description: The variant's prices.
* items:
* $ref: "#/components/schemas/AdminCreateProductVariantPrice"
* options:
* type: object
* description: The variant's options.
* - type: object
* description: The variant's variants.
* x-schemaName: AdminUpdateProductVariant
* properties:
* title:
* type: string
* title: title
* description: The variant's title.
* sku:
* type: string
* title: sku
* description: The variant's sku.
* ean:
* type: string
* title: ean
* description: The variant's ean.
* upc:
* type: string
* title: upc
* description: The variant's upc.
* barcode:
* type: string
* title: barcode
* description: The variant's barcode.
* hs_code:
* type: string
* title: hs_code
* description: The variant's hs code.
* mid_code:
* type: string
* title: mid_code
* description: The variant's mid code.
* allow_backorder:
* type: boolean
* title: allow_backorder
* description: The variant's allow backorder.
* manage_inventory:
* type: boolean
* title: manage_inventory
* description: The variant's manage inventory.
* variant_rank:
* type: number
* title: variant_rank
* description: The variant's variant rank.
* weight:
* type: number
* title: weight
* description: The variant's weight.
* length:
* type: number
* title: length
* description: The variant's length.
* height:
* type: number
* title: height
* description: The variant's height.
* width:
* type: number
* title: width
* description: The variant's width.
* origin_country:
* type: string
* title: origin_country
* description: The variant's origin country.
* material:
* type: string
* title: material
* description: The variant's material.
* metadata:
* type: object
* description: The variant's metadata.
* prices:
* type: array
* description: The variant's prices.
* items:
* $ref: "#/components/schemas/AdminCreateProductVariantPrice"
* options:
* type: object
* description: The variant's options.
* - $ref: "#/components/schemas/AdminCreateProductVariant"
* - $ref: "#/components/schemas/AdminUpdateProductVariant"
* sales_channels:
* type: array
* description: The update's sales channels.
* description: The sales channels that the product is available in.
* items:
* type: object
* description: The sales channel's sales channels.
* description: The sales channel's details.
* required:
* - id
* properties:
@@ -274,38 +115,38 @@
* weight:
* type: number
* title: weight
* description: The update's weight.
* description: The product's weight.
* length:
* type: number
* title: length
* description: The update's length.
* description: The product's length.
* height:
* type: number
* title: height
* description: The update's height.
* description: The product's height.
* width:
* type: number
* title: width
* description: The update's width.
* description: The product's width.
* hs_code:
* type: string
* title: hs_code
* description: The update's hs code.
* description: The product's HS code.
* mid_code:
* type: string
* title: mid_code
* description: The update's mid code.
* description: The product's MID code.
* origin_country:
* type: string
* title: origin_country
* description: The update's origin country.
* description: The product's origin country.
* material:
* type: string
* title: material
* description: The update's material.
* description: The product's material.
* metadata:
* type: object
* description: The update's metadata.
* description: The product's metadata, can hold custom key-value pairs.
*
*/