oas: [2/n] improve schema oas (#9040)

This commit is contained in:
Shahed Nasser
2024-09-06 18:53:07 +03:00
committed by GitHub
parent 0482b7751d
commit 7a80593b68
20 changed files with 168 additions and 204 deletions
@@ -1,7 +1,7 @@
/**
* @schema AdminCreateProduct
* type: object
* description: The create's details.
* description: The product's details.
* x-schemaName: AdminCreateProduct
* required:
* - title
@@ -9,47 +9,47 @@
* title:
* type: string
* title: title
* description: The create's title.
* description: The product's title.
* subtitle:
* type: string
* title: subtitle
* description: The create's subtitle.
* description: The product's subtitle.
* description:
* type: string
* title: description
* description: The create's description.
* description: The product's description.
* is_giftcard:
* type: boolean
* title: is_giftcard
* description: The create's is giftcard.
* description: Whether the product is a gift card.
* discountable:
* type: boolean
* title: discountable
* description: The create's discountable.
* description: Whether the product is discountable.
* images:
* type: array
* description: The create's images.
* description: The product's images.
* items:
* type: object
* description: The image's images.
* description: A product's image 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 create's thumbnail.
* description: The URL of the product's thumbnail.
* handle:
* type: string
* title: handle
* description: The create's handle.
* description: The product's handle.
* status:
* type: string
* description: The create's status.
* description: The product's status.
* enum:
* - draft
* - proposed
@@ -58,17 +58,17 @@
* type_id:
* type: string
* title: type_id
* description: The create's type id.
* description: The ID of the type the product belongs to.
* collection_id:
* type: string
* title: collection_id
* description: The create's collection id.
* description: The ID of the collection the product belongs to.
* categories:
* type: array
* description: The create's categories.
* description: The categories the product belongs to.
* items:
* type: object
* description: The category's categories.
* description: A category's details.
* required:
* - id
* properties:
@@ -78,10 +78,10 @@
* description: The category's ID.
* tags:
* type: array
* description: The create's tags.
* description: The product's tags.
* items:
* type: object
* description: The tag's tags.
* description: A tag's details.
* required:
* - id
* properties:
@@ -91,20 +91,20 @@
* description: The tag's ID.
* options:
* type: array
* description: The create's options.
* description: The product's options.
* items:
* $ref: "#/components/schemas/AdminCreateProductOption"
* variants:
* type: array
* description: The create's variants.
* description: The product's variants.
* items:
* $ref: "#/components/schemas/AdminCreateProductVariant"
* sales_channels:
* type: array
* description: The create's sales channels.
* description: The sales channels the product is available in.
* items:
* type: object
* description: The sales channel's sales channels.
* description: A sales channel's details.
* required:
* - id
* properties:
@@ -115,38 +115,38 @@
* weight:
* type: number
* title: weight
* description: The create's weight.
* description: The product's weight.
* length:
* type: number
* title: length
* description: The create's length.
* description: The product's length.
* height:
* type: number
* title: height
* description: The create's height.
* description: The product's height.
* width:
* type: number
* title: width
* description: The create's width.
* description: The product's width.
* hs_code:
* type: string
* title: hs_code
* description: The create's hs code.
* description: The product's HS code.
* mid_code:
* type: string
* title: mid_code
* description: The create's mid code.
* description: The product's MID code.
* origin_country:
* type: string
* title: origin_country
* description: The create's origin country.
* description: The product's origin country.
* material:
* type: string
* title: material
* description: The create's material.
* description: The product's material.
* metadata:
* type: object
* description: The create's metadata.
* description: The product's metadata, used to store custom key-value pairs.
*
*/