chore(oas): clean up oas (#9354)

* clean up generated oas

* fix issues in docs-util

* more fixes

* align max level

* validation fix

* add missing summaries

* fix validation

* fix exchanges route
This commit is contained in:
Shahed Nasser
2024-10-02 10:27:02 +03:00
committed by GitHub
parent 13a3c1bd77
commit 1e144e9c08
83 changed files with 2709 additions and 640 deletions
@@ -31,7 +31,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -31,7 +31,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -31,7 +31,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -53,7 +53,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -72,11 +72,11 @@
* title: deleted
* description: Whether the Customer was deleted.
* - type: object
* description: SUMMARY
* description: The deletion's details.
* properties:
* parent:
* $ref: "#/components/schemas/AdminCustomer"
* description: SUMMARY
* description: The deletion's details.
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -57,7 +57,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -76,11 +76,11 @@
* title: deleted
* description: Whether the Inventory Item was deleted.
* - type: object
* description: SUMMARY
* description: The deletion's details.
* properties:
* parent:
* $ref: "#/components/schemas/AdminInventoryItem"
* description: SUMMARY
* description: The deletion's details.
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -24,7 +24,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -56,7 +56,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -75,11 +75,11 @@
* title: deleted
* description: Whether the Tax Rate was deleted.
* - type: object
* description: SUMMARY
* description: The deletion's details.
* properties:
* parent:
* $ref: "#/components/schemas/AdminTaxRate"
* description: SUMMARY
* description: The deletion's details.
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -30,7 +30,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - id
* - object
@@ -19,7 +19,7 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The deletion's details.
* required:
* - success
* properties:
@@ -845,7 +845,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The paginated list of customer groups.
* required:
* - limit
* - offset
@@ -854,23 +854,23 @@
* limit:
* type: number
* title: limit
* description: The customer group's limit.
* description: The maximum number of items retrieved.
* offset:
* type: number
* title: offset
* description: The customer group's offset.
* description: The number of items skipped before retrieving the returned items.
* count:
* type: number
* title: count
* description: The customer group's count.
* description: The total number of items
* - type: object
* description: SUMMARY
* description: The paginated list of customer groups.
* required:
* - customer_groups
* properties:
* customer_groups:
* type: array
* description: The customer group's customer groups.
* description: The list of customer groups.
* items:
* $ref: "#/components/schemas/AdminCustomerGroup"
* "400":
@@ -1467,7 +1467,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The paginated list of draft orders.
* required:
* - limit
* - offset
@@ -1476,17 +1476,17 @@
* limit:
* type: number
* title: limit
* description: The draft order's limit.
* description: The maximum number of items returned.
* offset:
* type: number
* title: offset
* description: The draft order's offset.
* description: The number of items skipped before retrieving the returned items.
* count:
* type: number
* title: count
* description: The draft order's count.
* description: The total number of items.
* - type: object
* description: SUMMARY
* description: The paginated list of draft orders.
* required:
* - draft_orders
* properties:
@@ -830,7 +830,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The paginated list of exchanges.
* required:
* - limit
* - offset
@@ -839,22 +839,25 @@
* limit:
* type: number
* title: limit
* description: The exchange's limit.
* description: The maximum number of items returned.
* offset:
* type: number
* title: offset
* description: The exchange's offset.
* description: The number of items skipped before retrieving the returned items.
* count:
* type: number
* title: count
* description: The exchange's count.
* description: The total number of items.
* - type: object
* description: SUMMARY
* description: The paginated list of exchanges.
* required:
* - exchanges
* properties:
* exchanges:
* $ref: "#/components/schemas/AdminExchange"
* type: array
* description: The exchange's exchanges.
* items:
* $ref: "#/components/schemas/AdminExchange"
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -402,7 +402,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The paginated list of inventory items.
* required:
* - limit
* - offset
@@ -411,17 +411,17 @@
* limit:
* type: number
* title: limit
* description: The inventory item's limit.
* description: The maximum number of items returned.
* offset:
* type: number
* title: offset
* description: The inventory item's offset.
* description: The number of items skipped before retrieving the returned items.
* count:
* type: number
* title: count
* description: The inventory item's count.
* description: The total number of items.
* - type: object
* description: SUMMARY
* description: The paginated list of inventory items.
* required:
* - inventory_items
* properties:
@@ -105,7 +105,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The paginated list of inventory levels.
* required:
* - limit
* - offset
@@ -114,17 +114,17 @@
* limit:
* type: number
* title: limit
* description: The inventory item's limit.
* description: The maximum number of items returned.
* offset:
* type: number
* title: offset
* description: The inventory item's offset.
* description: The number of items skipped before retrieving the returned items.
* count:
* type: number
* title: count
* description: The inventory item's count.
* description: The total number of items.
* - type: object
* description: SUMMARY
* description: The paginated list of inventory levels.
* required:
* - inventory_levels
* properties:
@@ -482,7 +482,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The paginated list of product variants.
* required:
* - limit
* - offset
@@ -491,17 +491,17 @@
* limit:
* type: number
* title: limit
* description: The product variant's limit.
* description: The maximum number of items returned.
* offset:
* type: number
* title: offset
* description: The product variant's offset.
* description: The number of items skipped before retrieving the returned items.
* count:
* type: number
* title: count
* description: The product variant's count.
* description: The total number of items.
* - type: object
* description: SUMMARY
* description: The paginated list of product variants.
* required:
* - variants
* properties:
@@ -583,6 +583,412 @@
* type: string
* title: collection_id
* description: A product collection's ID.
* - name: variants
* in: query
* description: Filter the retrieved products' variants.
* required: false
* schema:
* type: object
* description: Filter the retrieved products' variants.
* x-schemaName: AdminProductVariantParams
* properties:
* q:
* type: string
* title: q
* description: Search term to apply on the variant's searchable properties.
* id:
* oneOf:
* - type: string
* title: id
* description: Filter by a variant's ID.
* - type: array
* description: Filter by variant IDs.
* items:
* type: string
* title: id
* description: A variant's ID.
* manage_inventory:
* type: boolean
* title: manage_inventory
* description: Filter by whether the Medusa application manages the variant's inventory.
* allow_backorder:
* type: boolean
* title: allow_backorder
* description: Filter by whether the variant can be ordered even if it's out of stock.
* created_at:
* type: object
* description: Filter by the variant's creation date.
* properties:
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* $eq:
* oneOf:
* - type: string
* title: $eq
* description: Filter by an exact match.
* - type: array
* description: Filter by an exact match.
* items:
* type: string
* title: $eq
* description: Filter by an exact match.
* $ne:
* type: string
* title: $ne
* description: Filter by values not equal to this parameter.
* $in:
* type: array
* description: Filter by values in this array.
* items:
* type: string
* title: $in
* description: Filter by values in this array.
* $nin:
* type: array
* description: Filter by values not in this array.
* items:
* type: string
* title: $nin
* description: Filter by values not in this array.
* $not:
* oneOf:
* - type: string
* title: $not
* description: Filter by values not matching the conditions in this parameter.
* - type: object
* description: Filter by values not matching the conditions in this parameter.
* - type: array
* description: Filter by values not matching the conditions in this parameter.
* items:
* type: string
* title: $not
* description: Filter by values not matching the conditions in this parameter.
* $gt:
* type: string
* title: $gt
* description: Filter by values greater than this parameter. Useful for numbers and dates only.
* $gte:
* type: string
* title: $gte
* description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
* $lt:
* type: string
* title: $lt
* description: Filter by values less than this parameter. Useful for numbers and dates only.
* $lte:
* type: string
* title: $lte
* description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
* $like:
* type: string
* title: $like
* description: Apply a `like` filter. Useful for strings only.
* $re:
* type: string
* title: $re
* description: Apply a regex filter. Useful for strings only.
* $ilike:
* type: string
* title: $ilike
* description: Apply a case-insensitive `like` filter. Useful for strings only.
* $fulltext:
* type: string
* title: $fulltext
* description: Filter to apply on full-text properties.
* $overlap:
* type: array
* description: Filter arrays that have overlapping values with this parameter.
* items:
* type: string
* title: $overlap
* description: Filter arrays that have overlapping values with this parameter.
* $contains:
* type: array
* description: Filter arrays that contain some of the values of this parameter.
* items:
* type: string
* title: $contains
* description: Filter arrays that contain some of the values of this parameter.
* $contained:
* type: array
* description: Filter arrays that contain all values of this parameter.
* items:
* type: string
* title: $contained
* description: Filter arrays that contain all values of this parameter.
* $exists:
* type: boolean
* title: $exists
* description: Filter by whether a value for this parameter exists (not `null`).
* updated_at:
* type: object
* description: The variant's updated at.
* properties:
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* $eq:
* oneOf:
* - type: string
* title: $eq
* description: Filter by an exact match.
* - type: array
* description: Filter by an exact match.
* items:
* type: string
* title: $eq
* description: Filter by an exact match.
* $ne:
* type: string
* title: $ne
* description: Filter by values not equal to this parameter.
* $in:
* type: array
* description: Filter by values in this array.
* items:
* type: string
* title: $in
* description: Filter by values in this array.
* $nin:
* type: array
* description: Filter by values not in this array.
* items:
* type: string
* title: $nin
* description: Filter by values not in this array.
* $not:
* oneOf:
* - type: string
* title: $not
* description: Filter by values not matching the conditions in this parameter.
* - type: object
* description: Filter by values not matching the conditions in this parameter.
* - type: array
* description: Filter by values not matching the conditions in this parameter.
* items:
* type: string
* title: $not
* description: Filter by values not matching the conditions in this parameter.
* $gt:
* type: string
* title: $gt
* description: Filter by values greater than this parameter. Useful for numbers and dates only.
* $gte:
* type: string
* title: $gte
* description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
* $lt:
* type: string
* title: $lt
* description: Filter by values less than this parameter. Useful for numbers and dates only.
* $lte:
* type: string
* title: $lte
* description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
* $like:
* type: string
* title: $like
* description: Apply a `like` filter. Useful for strings only.
* $re:
* type: string
* title: $re
* description: Apply a regex filter. Useful for strings only.
* $ilike:
* type: string
* title: $ilike
* description: Apply a case-insensitive `like` filter. Useful for strings only.
* $fulltext:
* type: string
* title: $fulltext
* description: Filter to apply on full-text properties.
* $overlap:
* type: array
* description: Filter arrays that have overlapping values with this parameter.
* items:
* type: string
* title: $overlap
* description: Filter arrays that have overlapping values with this parameter.
* $contains:
* type: array
* description: Filter arrays that contain some of the values of this parameter.
* items:
* type: string
* title: $contains
* description: Filter arrays that contain some of the values of this parameter.
* $contained:
* type: array
* description: Filter arrays that contain all values of this parameter.
* items:
* type: string
* title: $contained
* description: Filter arrays that contain all values of this parameter.
* $exists:
* type: boolean
* title: $exists
* description: Filter by whether a value for this parameter exists (not `null`).
* deleted_at:
* type: object
* description: The variant's deleted at.
* properties:
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* $eq:
* oneOf:
* - type: string
* title: $eq
* description: Filter by an exact match.
* - type: array
* description: Filter by an exact match.
* items:
* type: string
* title: $eq
* description: Filter by an exact match.
* $ne:
* type: string
* title: $ne
* description: Filter by values not equal to this parameter.
* $in:
* type: array
* description: Filter by values in this array.
* items:
* type: string
* title: $in
* description: Filter by values in this array.
* $nin:
* type: array
* description: Filter by values not in this array.
* items:
* type: string
* title: $nin
* description: Filter by values not in this array.
* $not:
* oneOf:
* - type: string
* title: $not
* description: Filter by values not matching the conditions in this parameter.
* - type: object
* description: Filter by values not matching the conditions in this parameter.
* - type: array
* description: Filter by values not matching the conditions in this parameter.
* items:
* type: string
* title: $not
* description: Filter by values not matching the conditions in this parameter.
* $gt:
* type: string
* title: $gt
* description: Filter by values greater than this parameter. Useful for numbers and dates only.
* $gte:
* type: string
* title: $gte
* description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
* $lt:
* type: string
* title: $lt
* description: Filter by values less than this parameter. Useful for numbers and dates only.
* $lte:
* type: string
* title: $lte
* description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
* $like:
* type: string
* title: $like
* description: Apply a `like` filter. Useful for strings only.
* $re:
* type: string
* title: $re
* description: Apply a regex filter. Useful for strings only.
* $ilike:
* type: string
* title: $ilike
* description: Apply a case-insensitive `like` filter. Useful for strings only.
* $fulltext:
* type: string
* title: $fulltext
* description: Filter to apply on full-text properties.
* $overlap:
* type: array
* description: Filter arrays that have overlapping values with this parameter.
* items:
* type: string
* title: $overlap
* description: Filter arrays that have overlapping values with this parameter.
* $contains:
* type: array
* description: Filter arrays that contain some of the values of this parameter.
* items:
* type: string
* title: $contains
* description: Filter arrays that contain some of the values of this parameter.
* $contained:
* type: array
* description: Filter arrays that contain all values of this parameter.
* items:
* type: string
* title: $contained
* description: Filter arrays that contain all values of this parameter.
* $exists:
* type: boolean
* title: $exists
* description: Filter by whether a value for this parameter exists (not `null`).
* limit:
* type: number
* title: limit
* description: Limit the number of items returned in the list.
* offset:
* type: number
* title: offset
* description: The number of items to skip when retrieving a list.
* order:
* type: string
* title: order
* description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
* fields:
* type: string
* title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields.
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
* security:
* - api_token: []
* - cookie_auth: []
@@ -109,7 +109,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The paginated list of refund reasons.
* required:
* - limit
* - offset
@@ -118,17 +118,17 @@
* limit:
* type: number
* title: limit
* description: The refund reason's limit.
* description: The maximum number of items returned.
* offset:
* type: number
* title: offset
* description: The refund reason's offset.
* description: The number of items skipped before retrieving the returned items.
* count:
* type: number
* title: count
* description: The refund reason's count.
* description: The total number of items.
* - type: object
* description: SUMMARY
* description: The paginated list of refund reasons.
* required:
* - refund_reasons
* properties:
@@ -647,7 +647,7 @@
* schema:
* allOf:
* - type: object
* description: SUMMARY
* description: The paginated list of returns.
* required:
* - limit
* - offset
@@ -656,17 +656,17 @@
* limit:
* type: number
* title: limit
* description: The return's limit.
* description: The maximum number of items returned.
* offset:
* type: number
* title: offset
* description: The return's offset.
* description: The number of items skipped before retrieving the returned items.
* count:
* type: number
* title: count
* description: The return's count.
* description: The total number of items.
* - type: object
* description: SUMMARY
* description: The paginated list of returns.
* required:
* - returns
* properties:
@@ -0,0 +1,80 @@
/**
* @oas [post] /admin/orders/{id}/fulfillments/{fulfillment_id}/mark-as-delivered
* operationId: PostOrdersIdFulfillmentsFulfillment_idMarkAsDelivered
* summary: Mark a Fulfillment as Delivered.
* x-sidebar-summary: Mark Delivered
* description: Mark an order's fulfillment as delivered.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The order's ID.
* required: true
* schema:
* type: string
* - name: fulfillment_id
* in: path
* description: The fulfillment's ID.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - name: fields
* in: query
* description: |-
* Comma-separated fields that should be included in the returned data.
* If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
* Without prefix it will replace the entire default fields.
* required: false
* schema:
* type: string
* title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminMarkOrderFulfillmentDelivered"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/orders/{id}/fulfillments/{fulfillment_id}/mark-as-delivered' \
* -H 'Authorization: Bearer {access_token}'
* tags:
* - Orders
* responses:
* "200":
* description: OK
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminOrderResponse"
* "400":
* $ref: "#/components/responses/400_error"
* "401":
* $ref: "#/components/responses/unauthorized"
* "404":
* $ref: "#/components/responses/not_found_error"
* "409":
* $ref: "#/components/responses/invalid_state_error"
* "422":
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* x-workflow: markOrderFulfillmentAsDeliveredWorkflow
*
*/
@@ -14,7 +14,7 @@
* schema:
* oneOf:
* - type: object
* description: SUMMARY
* description: The files to upload
* required:
* - files
* properties:
@@ -45,6 +45,8 @@
* required:
* - workflowId
* - transactionId
* - hasFinished
* - hasFailed
* properties:
* workflowId:
* type: string
@@ -54,6 +56,18 @@
* type: string
* description: The ID of the workflow exection's transaction. Use this later to track the workflow execution's progress or succeed / fail its steps.
* title: transactionId
* parentStepIdempotencyKey:
* type: string
* title: parentStepIdempotencyKey
* description: The idempotency key of the workflow execution.
* hasFinished:
* type: boolean
* title: hasFinished
* description: Whether the workflow execution has finished.
* hasFailed:
* type: boolean
* title: hasFailed
* description: Whether the workflow execution has failed.
* "400":
* $ref: "#/components/responses/400_error"
* "401":