chore(oas): [19/n] improve oas schemas (#9317)

- Improve OAS schemas [19/n]
- docs-generator: combine `Date | string` type to just `Date`.
This commit is contained in:
Shahed Nasser
2024-09-26 13:44:57 +00:00
committed by GitHub
parent 5390c8a845
commit af34bf6c0c
18 changed files with 2472 additions and 171 deletions
@@ -1,20 +1,18 @@
/**
* @schema OrderTransaction
* type: object
* description: The transaction's transactions.
* description: The transaction's details.
* x-schemaName: OrderTransaction
* required:
* - id
* - order_id
* - order
* - amount
* - raw_amount
* - currency_code
* - reference
* - reference_id
* - metadata
* - created_at
* - updated_at
* - metadata
* properties:
* id:
* type: string
@@ -23,49 +21,39 @@
* order_id:
* type: string
* title: order_id
* description: The transaction's order id.
* order:
* $ref: "#/components/schemas/Order"
* description: The ID of the order this transaction belongs to.
* amount:
* oneOf:
* - type: string
* title: amount
* description: The transaction's amount.
* - type: number
* title: amount
* description: The transaction's amount.
* - type: string
* title: amount
* description: The transaction's amount.
* - $ref: "#/components/schemas/IBigNumber"
* raw_amount:
* type: object
* description: The transaction's raw amount.
* type: number
* title: amount
* description: The transaction's amount.
* currency_code:
* type: string
* title: currency_code
* description: The transaction's currency code.
* example: usd
* reference:
* type: string
* title: reference
* description: The transaction's reference.
* description: The name of a table that this transaction references. If this transaction is for captured payment, its value is `capture`. If this transaction is for refunded payment, its value is `refund`.
* enum:
* - capture
* - refund
* reference_id:
* type: string
* title: reference_id
* description: The transaction's reference id.
* description: The ID of the referenced record in the referenced table.
* metadata:
* type: object
* description: The transaction's metadata, can hold custom key-value pairs.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The transaction's created at.
* description: The date that the transaction was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The transaction's updated at.
* metadata:
* type: object
* description: The transaction's metadata.
* description: The date that the transaction was updated.
*
*/
*/