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:
committed by
GitHub
parent
b9b65b7abb
commit
b08d867e8f
@@ -0,0 +1,2 @@
|
||||
curl -X POST '{backend_url}/admin/products/import' \
|
||||
-H 'x-medusa-access-token: {api_token}'
|
||||
@@ -0,0 +1,3 @@
|
||||
type: object
|
||||
description: SUMMARY
|
||||
x-schemaName: AdminImportProductRequest
|
||||
@@ -0,0 +1,10 @@
|
||||
type: object
|
||||
description: SUMMARY
|
||||
x-schemaName: AdminImportProductResponse
|
||||
required:
|
||||
- workflow_id
|
||||
properties:
|
||||
workflow_id:
|
||||
type: string
|
||||
title: workflow_id
|
||||
description: The product's workflow id.
|
||||
@@ -25734,6 +25734,95 @@ paths:
|
||||
$ref: '#/components/responses/invalid_request_error'
|
||||
'500':
|
||||
$ref: '#/components/responses/500_error'
|
||||
/admin/products/import:
|
||||
post:
|
||||
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'
|
||||
/admin/products/{id}:
|
||||
get:
|
||||
operationId: GetProductsId
|
||||
@@ -41473,6 +41562,21 @@ components:
|
||||
type: string
|
||||
title: fields
|
||||
description: The upload's fields.
|
||||
AdminImportProductRequest:
|
||||
type: object
|
||||
description: SUMMARY
|
||||
x-schemaName: AdminImportProductRequest
|
||||
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.
|
||||
AdminOrderCancelFulfillment:
|
||||
type: object
|
||||
description: SUMMARY
|
||||
|
||||
@@ -245,6 +245,8 @@ paths:
|
||||
$ref: paths/admin_products_batch.yaml
|
||||
/admin/products/export:
|
||||
$ref: paths/admin_products_export.yaml
|
||||
/admin/products/import:
|
||||
$ref: paths/admin_products_import.yaml
|
||||
/admin/products/{id}:
|
||||
$ref: paths/admin_products_{id}.yaml
|
||||
/admin/products/{id}/options:
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
post:
|
||||
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.yaml
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_products_import/post.sh
|
||||
tags:
|
||||
- Products
|
||||
responses:
|
||||
'202':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminImportProductResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
@@ -0,0 +1,3 @@
|
||||
type: object
|
||||
description: SUMMARY
|
||||
x-schemaName: AdminImportProductRequest
|
||||
@@ -0,0 +1,10 @@
|
||||
type: object
|
||||
description: SUMMARY
|
||||
x-schemaName: AdminImportProductResponse
|
||||
required:
|
||||
- workflow_id
|
||||
properties:
|
||||
workflow_id:
|
||||
type: string
|
||||
title: workflow_id
|
||||
description: The product's workflow id.
|
||||
@@ -5477,6 +5477,21 @@ components:
|
||||
type: string
|
||||
title: fields
|
||||
description: The upload's fields.
|
||||
AdminImportProductRequest:
|
||||
type: object
|
||||
description: SUMMARY
|
||||
x-schemaName: AdminImportProductRequest
|
||||
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.
|
||||
AdminOrderCancelFulfillment:
|
||||
type: object
|
||||
description: SUMMARY
|
||||
|
||||
@@ -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"
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* @schema AdminImportProductRequest
|
||||
* type: object
|
||||
* description: SUMMARY
|
||||
* x-schemaName: AdminImportProductRequest
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user