Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(oas): [17/n] improve OAS schemas #9284

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* @schema BaseOrderShippingDetail
* type: object
* description: Details of changes to a shipping method.
* x-schemaName: BaseOrderShippingDetail
* required:
* - id
* - shipping_method_id
* - shipping_method
* - claim_id
* - exchange_id
* - return_id
* - created_at
* - updated_at
* properties:
* id:
* type: string
* title: id
* description: The ID of the new changes to the shipping method.
* shipping_method_id:
* type: string
* title: shipping_method_id
* description: The ID of the shipping method.
* shipping_method:
* $ref: "#/components/schemas/BaseOrderShippingMethod"
* claim_id:
* type: string
* title: claim_id
* description: The ID of the associated claim.
* exchange_id:
* type: string
* title: exchange_id
* description: The ID of the associated exchange.
* return_id:
* type: string
* title: return_id
* description: The ID of the associated return.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the shipping method change was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the shipping method change was updated.
*
*/

130 changes: 34 additions & 96 deletions www/utils/generated/oas-output/schemas/BaseOrderShippingMethod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @schema BaseOrderShippingMethod
* type: object
* description: The shipping method's shipping methods.
* description: The shipping method's details.
* x-schemaName: BaseOrderShippingMethod
* required:
* - id
Expand Down Expand Up @@ -30,7 +30,7 @@
* order_id:
* type: string
* title: order_id
* description: The shipping method's order id.
* description: The ID of the order the shipping method belongs to.
* name:
* type: string
* title: name
Expand All @@ -46,17 +46,19 @@
* is_tax_inclusive:
* type: boolean
* title: is_tax_inclusive
* description: The shipping method's is tax inclusive.
* description: Whether the shipping method's amount includes applied taxes.
* shipping_option_id:
* type: string
* title: shipping_option_id
* description: The shipping method's shipping option id.
* description: The ID of the shipping option this method was created from.
* data:
* type: object
* description: The shipping method's data.
* description: The shipping method's data, useful for fulfillment provider handling its fulfillment.
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
* metadata:
* type: object
* description: The shipping method's metadata.
* description: The shipping method's metadata, can hold custom key-value pairs.
* tax_lines:
* type: array
* description: The shipping method's tax lines.
Expand All @@ -68,111 +70,47 @@
* items:
* $ref: "#/components/schemas/BaseOrderShippingMethodAdjustment"
* original_total:
* oneOf:
* - type: string
* title: original_total
* description: The shipping method's original total.
* - type: number
* title: original_total
* description: The shipping method's original total.
* - type: string
* title: original_total
* description: The shipping method's original total.
* - $ref: "#/components/schemas/IBigNumber"
* type: number
* title: original_total
* description: The shipping method's total including taxes, excluding promotions.
* original_subtotal:
* oneOf:
* - type: string
* title: original_subtotal
* description: The shipping method's original subtotal.
* - type: number
* title: original_subtotal
* description: The shipping method's original subtotal.
* - type: string
* title: original_subtotal
* description: The shipping method's original subtotal.
* - $ref: "#/components/schemas/IBigNumber"
* type: number
* title: original_subtotal
* description: The shipping method's total excluding taxes, including promotions.
* original_tax_total:
* oneOf:
* - type: string
* title: original_tax_total
* description: The shipping method's original tax total.
* - type: number
* title: original_tax_total
* description: The shipping method's original tax total.
* - type: string
* title: original_tax_total
* description: The shipping method's original tax total.
* - $ref: "#/components/schemas/IBigNumber"
* type: number
* title: original_tax_total
* description: The shipping method's total taxes excluding promotions.
* total:
* oneOf:
* - type: string
* title: total
* description: The shipping method's total.
* - type: number
* title: total
* description: The shipping method's total.
* - type: string
* title: total
* description: The shipping method's total.
* - $ref: "#/components/schemas/IBigNumber"
* type: number
* title: total
* description: The shipping method's total including taxes and promotions.
* subtotal:
* oneOf:
* - type: string
* title: subtotal
* description: The shipping method's subtotal.
* - type: number
* title: subtotal
* description: The shipping method's subtotal.
* - type: string
* title: subtotal
* description: The shipping method's subtotal.
* - $ref: "#/components/schemas/IBigNumber"
* type: number
* title: subtotal
* description: The shipping method's total excluding taxes, including promotions.
* tax_total:
* oneOf:
* - type: string
* title: tax_total
* description: The shipping method's tax total.
* - type: number
* title: tax_total
* description: The shipping method's tax total.
* - type: string
* title: tax_total
* description: The shipping method's tax total.
* - $ref: "#/components/schemas/IBigNumber"
* type: number
* title: tax_total
* description: The shipping method's tax total including promotions.
* discount_total:
* oneOf:
* - type: string
* title: discount_total
* description: The shipping method's discount total.
* - type: number
* title: discount_total
* description: The shipping method's discount total.
* - type: string
* title: discount_total
* description: The shipping method's discount total.
* - $ref: "#/components/schemas/IBigNumber"
* type: number
* title: discount_total
* description: The total discounts applied on the shipping method.
* discount_tax_total:
* oneOf:
* - type: string
* title: discount_tax_total
* description: The shipping method's discount tax total.
* - type: number
* title: discount_tax_total
* description: The shipping method's discount tax total.
* - type: string
* title: discount_tax_total
* description: The shipping method's discount tax total.
* - $ref: "#/components/schemas/IBigNumber"
* type: number
* title: discount_tax_total
* description: The taxes applied on the discount amount.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The shipping method's created at.
* description: The date the shipping method was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The shipping method's updated at.
* description: The date the shipping method was updated.
*
*/

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,59 @@
* type: object
* description: The adjustment's adjustments.
* x-schemaName: BaseOrderShippingMethodAdjustment
* properties:
* shipping_method:
* $ref: "#/components/schemas/BaseOrderShippingMethod"
* shipping_method_id:
* type: string
* title: shipping_method_id
* description: The ID of the shipping method this adjustment applies on.
* id:
* type: string
* title: id
* description: The adjustment's ID.
* code:
* type: string
* title: code
* description: The adjustment's code.
* amount:
* type: number
* title: amount
* description: The adjustment's amount.
* order_id:
* type: string
* title: order_id
* description: The ID of the associated order.
* description:
* type: string
* title: description
* description: The adjustment's description.
* promotion_id:
* type: string
* title: promotion_id
* description: The ID of the promotion applied by this adjustment.
* provider_id:
* type: string
* title: provider_id
* description: The adjustment's provider ID.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the adjustment was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the adjustment was updated.
* required:
* - shipping_method
* - shipping_method_id
* - id
* - amount
* - order_id
* - created_at
* - updated_at
*
*/

Original file line number Diff line number Diff line change
@@ -1,8 +1,67 @@
/**
* @schema BaseOrderShippingMethodTaxLine
* type: object
* description: The tax line's tax lines.
* description: The tax line's details.
* x-schemaName: BaseOrderShippingMethodTaxLine
* properties:
* shipping_method:
* $ref: "#/components/schemas/BaseOrderShippingMethod"
* shipping_method_id:
* type: string
* title: shipping_method_id
* description: The ID of the shipping method this tax line belongs to.
* total:
* type: number
* title: total
* description: The shipping method's total including taxes and promotions.
* subtotal:
* type: number
* title: subtotal
* description: The shipping method's total excluding taxes, including promotions.
* id:
* type: string
* title: id
* description: The tax line's ID.
* description:
* type: string
* title: description
* description: The tax line's description.
* tax_rate_id:
* type: string
* title: tax_rate_id
* description: The ID of the applied tax rate.
* code:
* type: string
* title: code
* description: The code that the tax rate is identified by.
* rate:
* type: number
* title: rate
* description: The rate to charge.
* provider_id:
* type: string
* title: provider_id
* description: The ID of the tax provider handling the tax calculation.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the tax line was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the tax line was updated.
* required:
* - shipping_method
* - shipping_method_id
* - total
* - subtotal
* - id
* - code
* - rate
* - created_at
* - updated_at
*
*/

Loading
Loading