oas: [15/n] improve oas schemas (#9216)
Improve OAS schemas [15/n] Note: validation error will be fixed once #9218 is merged
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @schema BaseApplicationMethod
|
||||
* type: object
|
||||
* description: The promotion's application method.
|
||||
* description: The application method's details.
|
||||
* x-schemaName: BaseApplicationMethod
|
||||
* required:
|
||||
* - id
|
||||
@@ -12,53 +12,54 @@
|
||||
* description: The application method's ID.
|
||||
* type:
|
||||
* type: string
|
||||
* description: The application method's type.
|
||||
* description: How the associated promotion is applied. `fixed` means a fixed amount is discounted; `percentage` means a percentage of the original amount is discounted.
|
||||
* enum:
|
||||
* - fixed
|
||||
* - percentage
|
||||
* target_type:
|
||||
* type: string
|
||||
* description: The application method's target type.
|
||||
* description: Which item does the promotion apply to. `items` mean the promotion applies to the cart's items; `shipping_methods` means the promotion applies to the cart's shipping methods; `order` means the promotion applies on the entire order.
|
||||
* enum:
|
||||
* - items
|
||||
* - shipping_methods
|
||||
* - order
|
||||
* allocation:
|
||||
* type: string
|
||||
* description: The application method's allocation.
|
||||
* description: How is the promotion amount discounted. `each` means the discounted amount is applied on each applicable item; `across` means the discounted amount is split accross the applicable items.
|
||||
* enum:
|
||||
* - each
|
||||
* - across
|
||||
* value:
|
||||
* type: number
|
||||
* title: value
|
||||
* description: The application method's value.
|
||||
* description: The amount to be discounted.
|
||||
* currency_code:
|
||||
* type: string
|
||||
* title: currency_code
|
||||
* description: The application method's currency code.
|
||||
* example: usd
|
||||
* max_quantity:
|
||||
* type: number
|
||||
* title: max_quantity
|
||||
* description: The application method's max quantity.
|
||||
* description: The max quantity allowed in the cart for the associated promotion to be applied.
|
||||
* buy_rules_min_quantity:
|
||||
* type: number
|
||||
* title: buy_rules_min_quantity
|
||||
* description: The application method's buy rules min quantity.
|
||||
* description: The minimum quantity required for a `buyget` promotion to be applied. For example, if the promotion is a "Buy 2 shirts get 1 free", the value of this attribute is `2`.
|
||||
* apply_to_quantity:
|
||||
* type: number
|
||||
* title: apply_to_quantity
|
||||
* description: The application method's apply to quantity.
|
||||
* description: The quantity that results from matching the `buyget` promotion's condition. For example, if the promotion is a "Buy 2 shirts get 1 free", the value of this attribute is `1`.
|
||||
* promotion:
|
||||
* $ref: "#/components/schemas/BasePromotion"
|
||||
* target_rules:
|
||||
* type: array
|
||||
* description: The application method's target rules.
|
||||
* description: The application method's target rules. These rules indicate which items / shipping methods the promotion applies to.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/BasePromotionRule"
|
||||
* buy_rules:
|
||||
* type: array
|
||||
* description: The application method's buy rules.
|
||||
* description: The application method's buy rules. These rules indicate which items are part of the "Buy X" rule.
|
||||
* items:
|
||||
* $ref: "#/components/schemas/BasePromotionRule"
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user