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,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.
*
*/