docs: fix OAS generator + generate OAS (#11584)

This commit is contained in:
Shahed Nasser
2025-02-24 15:30:38 +02:00
committed by GitHub
parent 41f070be9a
commit be566ca6fb
44 changed files with 10904 additions and 8753 deletions
@@ -1481,33 +1481,7 @@
* content:
* application/json:
* schema:
* allOf:
* - type: object
* description: The paginated list of draft orders.
* required:
* - limit
* - offset
* - count
* properties:
* limit:
* type: number
* title: limit
* description: The maximum number of items returned.
* offset:
* type: number
* title: offset
* description: The number of items skipped before retrieving the returned items.
* count:
* type: number
* title: count
* description: The total number of items.
* - type: object
* description: The paginated list of draft orders.
* required:
* - draft_orders
* properties:
* draft_orders:
* $ref: "#/components/schemas/AdminOrder"
* $ref: "#/components/schemas/AdminDraftOrderListResponse"
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -1520,6 +1494,7 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* x-workflow: getOrdersListWorkflow
*
*/
@@ -11,6 +11,20 @@
* required: true
* schema:
* type: string
* - 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.
* externalDocs:
* url: "#select-fields-and-relations"
* security:
* - api_token: []
* - cookie_auth: []
@@ -42,6 +56,7 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* x-workflow: getOrderDetailWorkflow
*
*/
@@ -0,0 +1,67 @@
/**
* @oas [post] /admin/draft-orders/{id}
* operationId: PostDraftOrdersId
* summary: Update a Draft Order
* description: Update a draft order's details.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The draft order's ID.
* required: true
* schema:
* type: string
* - 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.
* externalDocs:
* url: "#select-fields-and-relations"
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminUpdateDraftOrder"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/draft-orders/{id}' \
* -H 'Authorization: Bearer {access_token}'
* tags:
* - Draft Orders
* responses:
* "200":
* description: OK
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminDraftOrderResponse"
* "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: updateOrderWorkflow
*
*/
@@ -31,7 +31,12 @@
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/products/batch' \
* -H 'Authorization: Bearer {access_token}'
* -H 'Authorization: Bearer {access_token}' \
* --data-raw '{
* "delete": [
* "prod_123"
* ]
* }'
* tags:
* - Products
* responses: