chore(docs): Generated API Reference (v2) (#8252)

Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
github-actions[bot]
2024-07-24 09:16:25 +02:00
committed by GitHub
parent b9b65b7abb
commit b08d867e8f
12 changed files with 362 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
/**
* @oas [post] /admin/products/import
* operationId: PostProductsImport
* summary: Create Product
* description: Create a product.
* x-authenticated: true
* parameters:
* - 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.
* - name: offset
* in: query
* description: The number of items to skip when retrieving a list.
* required: false
* schema:
* type: number
* title: offset
* description: The number of items to skip when retrieving a list.
* - name: limit
* in: query
* description: Limit the number of items returned in the list.
* required: false
* schema:
* type: number
* title: limit
* description: Limit the number of items returned in the list.
* - name: order
* in: query
* 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
* `-`.
* required: false
* schema:
* 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminImportProductRequest"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/products/import' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Products
* responses:
* "202":
* description: OK
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminImportProductResponse"
* "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"
*
*/

View File

@@ -0,0 +1,8 @@
/**
* @schema AdminImportProductRequest
* type: object
* description: SUMMARY
* x-schemaName: AdminImportProductRequest
*
*/

View File

@@ -0,0 +1,15 @@
/**
* @schema AdminImportProductResponse
* type: object
* description: SUMMARY
* x-schemaName: AdminImportProductResponse
* required:
* - workflow_id
* properties:
* workflow_id:
* type: string
* title: workflow_id
* description: The product's workflow id.
*
*/