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 AdminCreatePromotionRule
* type: object
* description: The rule's rules.
* description: The promotion rule's details.
* x-schemaName: AdminCreatePromotionRule
* required:
* - operator
@@ -10,7 +10,7 @@
* properties:
* operator:
* type: string
* description: The rule's operator.
* description: The operator used to check whether the buy rule applies on a cart. For example, `eq` means that the cart's value for the specified attribute must match the specified value.
* enum:
* - gt
* - lt
@@ -26,18 +26,21 @@
* attribute:
* type: string
* title: attribute
* description: The rule's attribute.
* description: The attribute to compare against when checking whether a promotion can be applied on a cart.
* example: item.product.id
* values:
* oneOf:
* - type: string
* title: values
* description: The rule's values.
* description: The attribute's value.
* example: prod_123
* - type: array
* description: The rule's values.
* description: The allowed attribute values.
* items:
* type: string
* title: values
* description: The value's values.
* description: An attribute value.
* example: prod_123
*
*/