docs: generate OAS after cart promotion fixes (#11351)

This commit is contained in:
Shahed Nasser
2025-02-07 10:12:09 +02:00
committed by GitHub
parent 211997b137
commit 3a6818e3c4
14 changed files with 315 additions and 37 deletions
@@ -2,6 +2,7 @@ type: object
description: The cart's details.
x-schemaName: StoreCart
required:
- promotions
- currency_code
- id
- original_item_total
@@ -175,3 +176,8 @@ properties:
type: number
title: original_shipping_tax_total
description: The total taxes applied on the cart's shipping amount.
promotions:
type: array
description: The cart's promotions.
items:
$ref: ./StoreCartPromotion.yaml
@@ -0,0 +1,13 @@
type: object
description: The promotion's details.
required:
- promo_codes
properties:
promo_codes:
type: array
description: Promotion codes to add to the cart.
items:
type: string
title: promo_codes
description: A promotion code.
x-schemaName: StoreCartAddPromotion
@@ -0,0 +1,40 @@
type: object
description: The promotion's promotions.
x-schemaName: StoreCartPromotion
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
code:
type: string
title: code
description: The promotion's code.
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
application_method:
type: object
description: The promotion's application method.
required:
- value
- type
- currency_code
properties:
value:
type: string
title: value
description: The application method's value.
type:
type: string
description: The application method's type.
enum:
- fixed
- percentage
currency_code:
type: string
title: currency_code
description: The application method's currency code.
@@ -60815,6 +60815,7 @@ components:
description: The cart's details.
x-schemaName: StoreCart
required:
- promotions
- currency_code
- id
- original_item_total
@@ -60985,6 +60986,25 @@ components:
type: number
title: original_shipping_tax_total
description: The total taxes applied on the cart's shipping amount.
promotions:
type: array
description: The cart's promotions.
items:
$ref: '#/components/schemas/StoreCartPromotion'
StoreCartAddPromotion:
type: object
description: The promotion's details.
required:
- promo_codes
properties:
promo_codes:
type: array
description: Promotion codes to add to the cart.
items:
type: string
title: promo_codes
description: A promotion code.
x-schemaName: StoreCartAddPromotion
StoreCartAddress:
type: object
description: The address's details.
@@ -61395,6 +61415,47 @@ components:
type: number
title: discount_tax_total
description: The total taxes applied on the discounted amount.
StoreCartPromotion:
type: object
description: The promotion's promotions.
x-schemaName: StoreCartPromotion
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
code:
type: string
title: code
description: The promotion's code.
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
application_method:
type: object
description: The promotion's application method.
required:
- value
- type
- currency_code
properties:
value:
type: string
title: value
description: The application method's value.
type:
type: string
description: The application method's type.
enum:
- fixed
- percentage
currency_code:
type: string
title: currency_code
description: The application method's currency code.
StoreCartResponse:
type: object
description: The cart's details.
@@ -2,6 +2,7 @@ type: object
description: The cart's details.
x-schemaName: StoreCart
required:
- promotions
- currency_code
- id
- original_item_total
@@ -175,3 +176,8 @@ properties:
type: number
title: original_shipping_tax_total
description: The total taxes applied on the cart's shipping amount.
promotions:
type: array
description: The cart's promotions.
items:
$ref: ./StoreCartPromotion.yaml
@@ -0,0 +1,13 @@
type: object
description: The promotion's details.
required:
- promo_codes
properties:
promo_codes:
type: array
description: Promotion codes to add to the cart.
items:
type: string
title: promo_codes
description: A promotion code.
x-schemaName: StoreCartAddPromotion
@@ -0,0 +1,40 @@
type: object
description: The promotion's promotions.
x-schemaName: StoreCartPromotion
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
code:
type: string
title: code
description: The promotion's code.
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
application_method:
type: object
description: The promotion's application method.
required:
- value
- type
- currency_code
properties:
value:
type: string
title: value
description: The application method's value.
type:
type: string
description: The application method's type.
enum:
- fixed
- percentage
currency_code:
type: string
title: currency_code
description: The application method's currency code.
@@ -1228,18 +1228,7 @@ paths:
content:
application/json:
schema:
type: object
description: The promotion's details.
required:
- promo_codes
properties:
promo_codes:
type: array
description: Promotion codes to add to the cart.
items:
type: string
title: promo_codes
description: A promotion code.
$ref: '#/components/schemas/StoreCartAddPromotion'
x-codeSamples:
- lang: Shell
label: cURL
@@ -24762,6 +24751,7 @@ components:
description: The cart's details.
x-schemaName: StoreCart
required:
- promotions
- currency_code
- id
- original_item_total
@@ -24932,6 +24922,25 @@ components:
type: number
title: original_shipping_tax_total
description: The total taxes applied on the cart's shipping amount.
promotions:
type: array
description: The cart's promotions.
items:
$ref: '#/components/schemas/StoreCartPromotion'
StoreCartAddPromotion:
type: object
description: The promotion's details.
required:
- promo_codes
properties:
promo_codes:
type: array
description: Promotion codes to add to the cart.
items:
type: string
title: promo_codes
description: A promotion code.
x-schemaName: StoreCartAddPromotion
StoreCartAddress:
type: object
description: The address's details.
@@ -25342,6 +25351,47 @@ components:
type: number
title: discount_tax_total
description: The total taxes applied on the discounted amount.
StoreCartPromotion:
type: object
description: The promotion's promotions.
x-schemaName: StoreCartPromotion
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
code:
type: string
title: code
description: The promotion's code.
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
application_method:
type: object
description: The promotion's application method.
required:
- value
- type
- currency_code
properties:
value:
type: string
title: value
description: The application method's value.
type:
type: string
description: The application method's type.
enum:
- fixed
- percentage
currency_code:
type: string
title: currency_code
description: The application method's currency code.
StoreCartResponse:
type: object
description: The cart's details.
@@ -41,18 +41,7 @@ post:
content:
application/json:
schema:
type: object
description: The promotion's details.
required:
- promo_codes
properties:
promo_codes:
type: array
description: Promotion codes to add to the cart.
items:
type: string
title: promo_codes
description: A promotion code.
$ref: ../components/schemas/StoreCartAddPromotion.yaml
x-codeSamples:
- lang: Shell
label: cURL
@@ -2,7 +2,9 @@
* @oas [post] /store/carts/{id}
* operationId: PostCartsId
* summary: Update a Cart
* description: Update a cart's details. This unsets the payment methods chosen before, and the customer would have to choose them again. Also, if the customer has chosen a shipping method whose option isn't valid for the cart's shipping address anymore, the shipping method will be unset. For example, if the shipping option is valid only in the US geo zone, and the shipping address's country code is `DE`, the shipping method will be unset.
* description: Update a cart's details. This unsets the payment methods chosen before, and the customer would have to choose them again. Also, if the customer has chosen a shipping method whose option
* isn't valid for the cart's shipping address anymore, the shipping method will be unset. For example, if the shipping option is valid only in the US geo zone, and the shipping address's country code
* is `DE`, the shipping method will be unset.
* x-authenticated: false
* parameters:
* - name: id
@@ -36,18 +36,7 @@
* content:
* application/json:
* schema:
* type: object
* description: The promotion's details.
* required:
* - promo_codes
* properties:
* promo_codes:
* type: array
* description: Promotion codes to add to the cart.
* items:
* type: string
* title: promo_codes
* description: A promotion code.
* $ref: "#/components/schemas/StoreCartAddPromotion"
* x-codeSamples:
* - lang: Shell
* label: cURL
@@ -4,6 +4,7 @@
* description: The cart's details.
* x-schemaName: StoreCart
* required:
* - promotions
* - currency_code
* - id
* - original_item_total
@@ -174,6 +175,11 @@
* type: number
* title: original_shipping_tax_total
* description: The total taxes applied on the cart's shipping amount.
* promotions:
* type: array
* description: The cart's promotions.
* items:
* $ref: "#/components/schemas/StoreCartPromotion"
*
*/
@@ -0,0 +1,18 @@
/**
* @schema StoreCartAddPromotion
* type: object
* description: The promotion's details.
* required:
* - promo_codes
* properties:
* promo_codes:
* type: array
* description: Promotion codes to add to the cart.
* items:
* type: string
* title: promo_codes
* description: A promotion code.
* x-schemaName: StoreCartAddPromotion
*
*/
@@ -0,0 +1,45 @@
/**
* @schema StoreCartPromotion
* type: object
* description: The promotion's promotions.
* x-schemaName: StoreCartPromotion
* required:
* - id
* properties:
* id:
* type: string
* title: id
* description: The promotion's ID.
* code:
* type: string
* title: code
* description: The promotion's code.
* is_automatic:
* type: boolean
* title: is_automatic
* description: The promotion's is automatic.
* application_method:
* type: object
* description: The promotion's application method.
* required:
* - value
* - type
* - currency_code
* properties:
* value:
* type: string
* title: value
* description: The application method's value.
* type:
* type: string
* description: The application method's type.
* enum:
* - fixed
* - percentage
* currency_code:
* type: string
* title: currency_code
* description: The application method's currency code.
*
*/