chore(oas): [9/n] improve oas schemas (#9166)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-09-17 19:27:28 +02:00
1 parent b5ffed6973
commit d2c48228df
20 files changed
+119 -114

No files matched your search

@@ -1,20 +1,20 @@
/** /**
* @schema AdminPostReturnsReturnReqSchema * @schema AdminPostReturnsReturnReqSchema
* type: object * type: object
* description: SUMMARY * description: The return's details.
* x-schemaName: AdminPostReturnsReturnReqSchema * x-schemaName: AdminPostReturnsReturnReqSchema
* properties: * properties:
* location_id: * location_id:
* type: string * type: string
* title: location_id * title: location_id
* description: The return's location id. * description: The ID of the location to return items to.
* no_notification: * no_notification:
* type: boolean * type: boolean
* title: no_notification * title: no_notification
* description: The return's no notification. * description: Whether the customer should receive notifications about updates to the return.
* metadata: * metadata:
* type: object * type: object
* description: The return's metadata. * description: The return's metadata, can hold custom key-value pairs.
* *
*/ */
@@ -1,20 +1,20 @@
/** /**
* @schema AdminPostReturnsShippingActionReqSchema * @schema AdminPostReturnsShippingActionReqSchema
* type: object * type: object
* description: SUMMARY * description: The shipping method's details.
* x-schemaName: AdminPostReturnsShippingActionReqSchema * x-schemaName: AdminPostReturnsShippingActionReqSchema
* properties: * properties:
* custom_amount: * custom_amount:
* type: number * type: number
* title: custom_amount * title: custom_amount
* description: The return's custom amount. * description: Set a custom price for the shipping method.
* internal_note: * internal_note:
* type: string * type: string
* title: internal_note * title: internal_note
* description: The return's internal note. * description: A note viewed only by admin users.
* metadata: * metadata:
* type: object * type: object
* description: The return's metadata. * description: The return's metadata, can hold custom key-value pairs.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPostReturnsShippingReqSchema * @schema AdminPostReturnsShippingReqSchema
* type: object * type: object
* description: SUMMARY * description: The shipping method's details.
* x-schemaName: AdminPostReturnsShippingReqSchema * x-schemaName: AdminPostReturnsShippingReqSchema
* required: * required:
* - shipping_option_id * - shipping_option_id
@@ -9,22 +9,22 @@
* shipping_option_id: * shipping_option_id:
* type: string * type: string
* title: shipping_option_id * title: shipping_option_id
* description: The exchange's shipping option id. * description: The ID of the associated shipping option.
* custom_amount: * custom_amount:
* type: number * type: number
* title: custom_amount * title: custom_amount
* description: The exchange's custom amount. * description: Set the price of the shipping method.
* description: * description:
* type: string * type: string
* title: description * title: description
* description: The exchange's description. * description: The shipping method's description.
* internal_note: * internal_note:
* type: string * type: string
* title: internal_note * title: internal_note
* description: The exchange's internal note. * description: A note viewed only by admin users.
* metadata: * metadata:
* type: object * type: object
* description: The exchange's metadata. * description: The exchange's metadata, can hold custom key-value pairs.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPrice * @schema AdminPrice
* type: object * type: object
* description: The price's prices. * description: The price's details.
* x-schemaName: AdminPrice * x-schemaName: AdminPrice
* required: * required:
* - id * - id
@@ -28,6 +28,7 @@
* type: string * type: string
* title: currency_code * title: currency_code
* description: The price's currency code. * description: The price's currency code.
* example: usd
* amount: * amount:
* type: number * type: number
* title: amount * title: amount
@@ -38,30 +39,30 @@
* min_quantity: * min_quantity:
* type: number * type: number
* title: min_quantity * title: min_quantity
* description: The price's min quantity. * description: The minimum quantity that must be available in the cart for the price to be applied.
* max_quantity: * max_quantity:
* type: number * type: number
* title: max_quantity * title: max_quantity
* description: The price's max quantity. * description: The maximum quantity allowed to be available in the cart for the price to be applied.
* price_set_id: * price_set_id:
* type: string * type: string
* title: price_set_id * title: price_set_id
* description: The price's price set id. * description: The ID of the associated price set.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The price's created at. * description: The date the price was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The price's updated at. * description: The date the price was updated.
* deleted_at: * deleted_at:
* type: string * type: string
* format: date-time * format: date-time
* title: deleted_at * title: deleted_at
* description: The price's deleted at. * description: The date the price was deleted.
* *
*/ */
@@ -35,11 +35,11 @@
* starts_at: * starts_at:
* type: string * type: string
* title: starts_at * title: starts_at
* description: The price list's starts at. * description: The date the price list starts.
* ends_at: * ends_at:
* type: string * type: string
* title: ends_at * title: ends_at
* description: The price list's ends at. * description: The date the price list ends.
* status: * status:
* type: string * type: string
* description: The price list's status. * description: The price list's status.
@@ -61,17 +61,17 @@
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The price list's created at. * description: The date the price list was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The price list's updated at. * description: The date the price list was updated.
* deleted_at: * deleted_at:
* type: string * type: string
* format: date-time * format: date-time
* title: deleted_at * title: deleted_at
* description: The price list's deleted at. * description: The date the price list was deleted.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPriceListBatchResponse * @schema AdminPriceListBatchResponse
* type: object * type: object
* description: SUMMARY * description: The details of the created, updated, and deleted prices in a price list.
* x-schemaName: AdminPriceListBatchResponse * x-schemaName: AdminPriceListBatchResponse
* required: * required:
* - created * - created
@@ -10,17 +10,17 @@
* properties: * properties:
* created: * created:
* type: array * type: array
* description: The price list's created. * description: The created prices.
* items: * items:
* $ref: "#/components/schemas/AdminPrice" * $ref: "#/components/schemas/AdminPrice"
* updated: * updated:
* type: array * type: array
* description: The price list's updated. * description: The updated prices.
* items: * items:
* $ref: "#/components/schemas/AdminPrice" * $ref: "#/components/schemas/AdminPrice"
* deleted: * deleted:
* type: object * type: object
* description: SUMMARY * description: The details of the deleted prices.
* required: * required:
* - ids * - ids
* - object * - object
@@ -28,19 +28,20 @@
* properties: * properties:
* ids: * ids:
* type: array * type: array
* description: The deleted's ids. * description: The IDs of the deleted prices.
* items: * items:
* type: string * type: string
* title: ids * title: ids
* description: The id's ids. * description: A price's ID.
* object: * object:
* type: string * type: string
* title: object * title: object
* description: SUMMARY * description: The name of the deleted object.
* default: "price"
* deleted: * deleted:
* type: boolean * type: boolean
* title: deleted * title: deleted
* description: SUMMARY * description: Whether the prices were deleted.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPriceListDeleteResponse * @schema AdminPriceListDeleteResponse
* type: object * type: object
* description: SUMMARY * description: The details of the deleted price list.
* x-schemaName: AdminPriceListDeleteResponse * x-schemaName: AdminPriceListDeleteResponse
* required: * required:
* - id * - id
@@ -20,7 +20,7 @@
* deleted: * deleted:
* type: boolean * type: boolean
* title: deleted * title: deleted
* description: Whether the Price List was deleted. * description: Whether the price list was deleted.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPriceListListResponse * @schema AdminPriceListListResponse
* type: object * type: object
* description: SUMMARY * description: The paginated list of price lists.
* x-schemaName: AdminPriceListListResponse * x-schemaName: AdminPriceListListResponse
* required: * required:
* - limit * - limit
@@ -12,18 +12,18 @@
* limit: * limit:
* type: number * type: number
* title: limit * title: limit
* description: The price list's limit. * description: The maximum number of items returned.
* offset: * offset:
* type: number * type: number
* title: offset * title: offset
* description: The price list's offset. * description: The number of items skipped before retrieving the returned items.
* count: * count:
* type: number * type: number
* title: count * title: count
* description: The price list's count. * description: The total number of items.
* price_lists: * price_lists:
* type: array * type: array
* description: The price list's price lists. * description: The list of price lists.
* items: * items:
* $ref: "#/components/schemas/AdminPriceList" * $ref: "#/components/schemas/AdminPriceList"
* *
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPriceListPrice * @schema AdminPriceListPrice
* type: object * type: object
* description: The price's prices. * description: The details of a price list's price.
* x-schemaName: AdminPriceListPrice * x-schemaName: AdminPriceListPrice
* required: * required:
* - variant_id * - variant_id
@@ -21,7 +21,7 @@
* variant_id: * variant_id:
* type: string * type: string
* title: variant_id * title: variant_id
* description: The price's variant id. * description: The ID of the product variant this price list is for.
* rules: * rules:
* type: object * type: object
* description: The price's rules. * description: The price's rules.
@@ -37,6 +37,7 @@
* type: string * type: string
* title: currency_code * title: currency_code
* description: The price's currency code. * description: The price's currency code.
* example: usd
* amount: * amount:
* type: number * type: number
* title: amount * title: amount
@@ -47,30 +48,30 @@
* min_quantity: * min_quantity:
* type: number * type: number
* title: min_quantity * title: min_quantity
* description: The price's min quantity. * description: The minimum quantity that must be available in the cart for the price to be applied.
* max_quantity: * max_quantity:
* type: number * type: number
* title: max_quantity * title: max_quantity
* description: The price's max quantity. * description: The maximum quantity allowed to be available in the cart for the price to be applied.
* price_set_id: * price_set_id:
* type: string * type: string
* title: price_set_id * title: price_set_id
* description: The price's price set id. * description: The ID of the price set this price belongs to.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The price's created at. * description: The date the price was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The price's updated at. * description: The date the price was updated.
* deleted_at: * deleted_at:
* type: string * type: string
* format: date-time * format: date-time
* title: deleted_at * title: deleted_at
* description: The price's deleted at. * description: The date the price was deleted.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPriceListResponse * @schema AdminPriceListResponse
* type: object * type: object
* description: SUMMARY * description: The price list's details.
* x-schemaName: AdminPriceListResponse * x-schemaName: AdminPriceListResponse
* required: * required:
* - price_list * - price_list
@@ -20,29 +20,31 @@
* type: string * type: string
* title: attribute * title: attribute
* description: The price preference's attribute. * description: The price preference's attribute.
* example: region_id
* value: * value:
* type: string * type: string
* title: value * title: value
* description: The price preference's value. * description: The price preference's value.
* example: reg_123
* is_tax_inclusive: * is_tax_inclusive:
* type: boolean * type: boolean
* title: is_tax_inclusive * title: is_tax_inclusive
* description: The price preference's is tax inclusive. * description: Whether prices matching this preference include taxes.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The price preference's created at. * description: The date the price preference was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The price preference's updated at. * description: The date the price preference was updated.
* deleted_at: * deleted_at:
* type: string * type: string
* format: date-time * format: date-time
* title: deleted_at * title: deleted_at
* description: The price preference's deleted at. * description: The date the price preference was deleted.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPricePreferenceDeleteResponse * @schema AdminPricePreferenceDeleteResponse
* type: object * type: object
* description: SUMMARY * description: The details of the deleted price preference.
* x-schemaName: AdminPricePreferenceDeleteResponse * x-schemaName: AdminPricePreferenceDeleteResponse
* required: * required:
* - id * - id
@@ -20,7 +20,7 @@
* deleted: * deleted:
* type: boolean * type: boolean
* title: deleted * title: deleted
* description: Whether the Price Preference was deleted. * description: Whether the price preference was deleted.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPricePreferenceListResponse * @schema AdminPricePreferenceListResponse
* type: object * type: object
* description: SUMMARY * description: The paginated list of price preferences.
* x-schemaName: AdminPricePreferenceListResponse * x-schemaName: AdminPricePreferenceListResponse
* required: * required:
* - limit * - limit
@@ -12,18 +12,18 @@
* limit: * limit:
* type: number * type: number
* title: limit * title: limit
* description: The price preference's limit. * description: The maximum number of items returned.
* offset: * offset:
* type: number * type: number
* title: offset * title: offset
* description: The price preference's offset. * description: The number of items skipped before retrieving the returned items.
* count: * count:
* type: number * type: number
* title: count * title: count
* description: The price preference's count. * description: The total count of items.
* price_preferences: * price_preferences:
* type: array * type: array
* description: The price preference's price preferences. * description: The list of price preferences.
* items: * items:
* $ref: "#/components/schemas/AdminPricePreference" * $ref: "#/components/schemas/AdminPricePreference"
* *
@@ -1,7 +1,7 @@
/** /**
* @schema AdminPricePreferenceResponse * @schema AdminPricePreferenceResponse
* type: object * type: object
* description: SUMMARY * description: The price preference's details.
* x-schemaName: AdminPricePreferenceResponse * x-schemaName: AdminPricePreferenceResponse
* required: * required:
* - price_preference * - price_preference
@@ -1,7 +1,7 @@
/** /**
* @schema AdminProduct * @schema AdminProduct
* type: object * type: object
* description: The product's parent. * description: The product's details.
* x-schemaName: AdminProduct * x-schemaName: AdminProduct
* required: * required:
* - type * - type
@@ -35,37 +35,37 @@
* $ref: "#/components/schemas/AdminCollection" * $ref: "#/components/schemas/AdminCollection"
* categories: * categories:
* type: array * type: array
* description: The parent's categories. * description: The product's categories.
* items: * items:
* $ref: "#/components/schemas/AdminProductCategory" * $ref: "#/components/schemas/AdminProductCategory"
* sales_channels: * sales_channels:
* type: array * type: array
* description: The parent's sales channels. * description: The sales channels that the product is available in.
* items: * items:
* $ref: "#/components/schemas/AdminSalesChannel" * $ref: "#/components/schemas/AdminSalesChannel"
* variants: * variants:
* type: array * type: array
* description: The parent's variants. * description: The product's variants.
* items: * items:
* $ref: "#/components/schemas/AdminProductVariant" * $ref: "#/components/schemas/AdminProductVariant"
* type: * type:
* $ref: "#/components/schemas/AdminProductType" * $ref: "#/components/schemas/AdminProductType"
* tags: * tags:
* type: array * type: array
* description: The parent's tags. * description: The product's tags.
* items: * items:
* $ref: "#/components/schemas/AdminProductTag" * $ref: "#/components/schemas/AdminProductTag"
* length: * length:
* type: number * type: number
* title: length * title: length
* description: The parent's length. * description: The product's length.
* title: * title:
* type: string * type: string
* title: title * title: title
* description: The parent's title. * description: The product's title.
* status: * status:
* type: string * type: string
* description: The parent's status. * description: The product's status.
* enum: * enum:
* - draft * - draft
* - proposed * - proposed
@@ -73,100 +73,100 @@
* - rejected * - rejected
* options: * options:
* type: array * type: array
* description: The parent's options. * description: The product's options.
* items: * items:
* $ref: "#/components/schemas/BaseProductOption" * $ref: "#/components/schemas/BaseProductOption"
* description: * description:
* type: string * type: string
* title: description * title: description
* description: The parent's description. * description: The product's description.
* id: * id:
* type: string * type: string
* title: id * title: id
* description: The parent's ID. * description: The product's ID.
* metadata: * metadata:
* type: object * type: object
* description: The parent's metadata. * description: The product's metadata, can hold custom key-value pairs.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The parent's created at. * description: The date the product was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The parent's updated at. * description: The date the product was updated.
* handle: * handle:
* type: string * type: string
* title: handle * title: handle
* description: The parent's handle. * description: The product's unique handle.
* subtitle: * subtitle:
* type: string * type: string
* title: subtitle * title: subtitle
* description: The parent's subtitle. * description: The product's subtitle.
* is_giftcard: * is_giftcard:
* type: boolean * type: boolean
* title: is_giftcard * title: is_giftcard
* description: The parent's is giftcard. * description: Whether the product is a gift card.
* thumbnail: * thumbnail:
* type: string * type: string
* title: thumbnail * title: thumbnail
* description: The parent's thumbnail. * description: The product's thumbnail.
* width: * width:
* type: number * type: number
* title: width * title: width
* description: The parent's width. * description: The product's width.
* weight: * weight:
* type: number * type: number
* title: weight * title: weight
* description: The parent's weight. * description: The product's weight.
* height: * height:
* type: number * type: number
* title: height * title: height
* description: The parent's height. * description: The product's height.
* origin_country: * origin_country:
* type: string * type: string
* title: origin_country * title: origin_country
* description: The parent's origin country. * description: The product's origin country.
* hs_code: * hs_code:
* type: string * type: string
* title: hs_code * title: hs_code
* description: The parent's hs code. * description: The product's HS code.
* mid_code: * mid_code:
* type: string * type: string
* title: mid_code * title: mid_code
* description: The parent's mid code. * description: The product's MID code.
* material: * material:
* type: string * type: string
* title: material * title: material
* description: The parent's material. * description: The product's material.
* collection_id: * collection_id:
* type: string * type: string
* title: collection_id * title: collection_id
* description: The parent's collection id. * description: The ID of the collection that the product belongs to.
* type_id: * type_id:
* type: string * type: string
* title: type_id * title: type_id
* description: The parent's type id. * description: The ID of the product's type.
* images: * images:
* type: array * type: array
* description: The parent's images. * description: The product's images.
* items: * items:
* $ref: "#/components/schemas/BaseProductImage" * $ref: "#/components/schemas/BaseProductImage"
* discountable: * discountable:
* type: boolean * type: boolean
* title: discountable * title: discountable
* description: The parent's discountable. * description: Whether discounts can be applied on the product.
* external_id: * external_id:
* type: string * type: string
* title: external_id * title: external_id
* description: The parent's external id. * description: The ID of a product in an external system, such as an ERP or CMS.
* deleted_at: * deleted_at:
* type: string * type: string
* format: date-time * format: date-time
* title: deleted_at * title: deleted_at
* description: The parent's deleted at. * description: The date the product was deleted.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminProductCategory * @schema AdminProductCategory
* type: object * type: object
* description: The category's categories. * description: The product category's details.
* x-schemaName: AdminProductCategory * x-schemaName: AdminProductCategory
* required: * required:
* - category_children * - category_children
@@ -20,7 +20,7 @@
* properties: * properties:
* category_children: * category_children:
* type: array * type: array
* description: The category's category children. * description: The category's children.
* items: * items:
* $ref: "#/components/schemas/AdminProductCategory" * $ref: "#/components/schemas/AdminProductCategory"
* parent_category: * parent_category:
@@ -44,42 +44,42 @@
* description: The category's ID. * description: The category's ID.
* metadata: * metadata:
* type: object * type: object
* description: The category's metadata. * description: The category's metadata, can hold custom key-value pairs.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The category's created at. * description: The date the category was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The category's updated at. * description: The date the category was updated.
* handle: * handle:
* type: string * type: string
* title: handle * title: handle
* description: The category's handle. * description: The category's unique handle.
* deleted_at: * deleted_at:
* type: string * type: string
* format: date-time * format: date-time
* title: deleted_at * title: deleted_at
* description: The category's deleted at. * description: The date the category was deleted.
* is_active: * is_active:
* type: boolean * type: boolean
* title: is_active * title: is_active
* description: The category's is active. * description: Whether the category is active. If disabled, the category isn't shown in the storefront.
* is_internal: * is_internal:
* type: boolean * type: boolean
* title: is_internal * title: is_internal
* description: The category's is internal. * description: Whether the category is internal. If enabled, the category is only seen by admin users.
* rank: * rank:
* type: number * type: number
* title: rank * title: rank
* description: The category's rank. * description: The category's rank among sibling categories.
* parent_category_id: * parent_category_id:
* type: string * type: string
* title: parent_category_id * title: parent_category_id
* description: The category's parent category id. * description: The ID of the category's parent.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminProductCategoryDeleteResponse * @schema AdminProductCategoryDeleteResponse
* type: object * type: object
* description: SUMMARY * description: The details of deleting the category.
* x-schemaName: AdminProductCategoryDeleteResponse * x-schemaName: AdminProductCategoryDeleteResponse
* required: * required:
* - id * - id
@@ -20,7 +20,7 @@
* deleted: * deleted:
* type: boolean * type: boolean
* title: deleted * title: deleted
* description: Whether the Product Category was deleted. * description: Whether the product category was deleted.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminProductCategoryListResponse * @schema AdminProductCategoryListResponse
* type: object * type: object
* description: SUMMARY * description: The paginated list of product categories.
* x-schemaName: AdminProductCategoryListResponse * x-schemaName: AdminProductCategoryListResponse
* required: * required:
* - limit * - limit
@@ -12,18 +12,18 @@
* limit: * limit:
* type: number * type: number
* title: limit * title: limit
* description: The product category's limit. * description: The maximum number of items returned.
* offset: * offset:
* type: number * type: number
* title: offset * title: offset
* description: The product category's offset. * description: The number of items skipped before retrieving the returned items.
* count: * count:
* type: number * type: number
* title: count * title: count
* description: The product category's count. * description: The total number of items.
* product_categories: * product_categories:
* type: array * type: array
* description: The product category's product categories. * description: The list of product categories.
* items: * items:
* $ref: "#/components/schemas/AdminProductCategory" * $ref: "#/components/schemas/AdminProductCategory"
* *
@@ -1,7 +1,7 @@
/** /**
* @schema AdminProductCategoryResponse * @schema AdminProductCategoryResponse
* type: object * type: object
* description: SUMMARY * description: The product category's details.
* x-schemaName: AdminProductCategoryResponse * x-schemaName: AdminProductCategoryResponse
* required: * required:
* - product_category * - product_category
@@ -1,7 +1,7 @@
/** /**
* @schema AdminProductDeleteResponse * @schema AdminProductDeleteResponse
* type: object * type: object
* description: SUMMARY * description: The details of the product deletion.
* x-schemaName: AdminProductDeleteResponse * x-schemaName: AdminProductDeleteResponse
* required: * required:
* - id * - id
@@ -20,7 +20,7 @@
* deleted: * deleted:
* type: boolean * type: boolean
* title: deleted * title: deleted
* description: Whether the Product was deleted. * description: Whether the product was deleted.
* *
*/ */