docs: Change :id to {id} in OAS comments (#2015)

This commit is contained in:
Shahed Nasser
2022-08-08 17:35:13 +03:00
committed by GitHub
parent 1c6fcb2ede
commit cef081d2f2
21 changed files with 3163 additions and 2970 deletions

View File

@@ -109,6 +109,10 @@ tags:
servers:
- url: https://api.medusa-commerce.com/admin
paths:
/apps/authorizations:
$ref: paths/apps_authorizations.yaml
/apps:
$ref: paths/apps.yaml
/auth:
$ref: paths/auth.yaml
/batch-jobs/{id}/cancel:
@@ -133,10 +137,6 @@ paths:
$ref: paths/customer-groups_{id}.yaml
/customer-groups/{id}/customers:
$ref: paths/customer-groups_{id}_customers.yaml
/customers:
$ref: paths/customers.yaml
/customers/{id}:
$ref: paths/customers_{id}.yaml
/discounts/{id}/regions/{region_id}:
$ref: paths/discounts_{id}_regions_{region_id}.yaml
/discounts/{discount_id}/conditions:
@@ -153,10 +153,10 @@ paths:
$ref: paths/discounts_{id}_dynamic-codes_{code}.yaml
/discounts/code/{code}:
$ref: paths/discounts_code_{code}.yaml
/apps/authorizations:
$ref: paths/apps_authorizations.yaml
/apps:
$ref: paths/apps.yaml
/customers:
$ref: paths/customers.yaml
/customers/{id}:
$ref: paths/customers_{id}.yaml
/draft-orders:
$ref: paths/draft-orders.yaml
/draft-orders/{id}/line-items:
@@ -249,8 +249,8 @@ paths:
$ref: paths/price-lists_{id}_products_{product_id}_prices.yaml
/price-lists/{id}/variants/{variant_id}/prices:
$ref: paths/price-lists_{id}_variants_{variant_id}_prices.yaml
/price-lists/:id/products:
$ref: paths/price-lists_:id_products.yaml
/price-lists/{id}/products:
$ref: paths/price-lists_{id}_products.yaml
/product-tags:
$ref: paths/product-tags.yaml
/product-types:
@@ -327,18 +327,16 @@ paths:
$ref: paths/swaps_{id}.yaml
/swaps:
$ref: paths/swaps.yaml
/tax-rates/:id/product-types/batch:
$ref: paths/tax-rates_:id_product-types_batch.yaml
/tax-rates/:id/products/batch:
$ref: paths/tax-rates_:id_products_batch.yaml
/tax-rates/:id/shipping-options/batch:
$ref: paths/tax-rates_:id_shipping-options_batch.yaml
/tax-rates/{id}/product-types/batch:
$ref: paths/tax-rates_{id}_product-types_batch.yaml
/tax-rates/{id}/products/batch:
$ref: paths/tax-rates_{id}_products_batch.yaml
/tax-rates/{id}/shipping-options/batch:
$ref: paths/tax-rates_{id}_shipping-options_batch.yaml
/tax-rates:
$ref: paths/tax-rates.yaml
/tax-rates/{id}:
$ref: paths/tax-rates_{id}.yaml
/tax-rates/:id:
$ref: paths/tax-rates_:id.yaml
/uploads:
$ref: paths/uploads.yaml
/users:

View File

@@ -4,6 +4,12 @@ get:
description: Retrieves a list of Product that are part of a Price List
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: ID of the price list.
schema:
type: string
- in: query
name: q
description: >-

View File

@@ -1,102 +0,0 @@
get:
operationId: GetTaxRatesTaxRate
summary: Get Tax Rate
description: Retrieves a TaxRate
parameters:
- in: query
name: fields
description: Which fields should be included in the result.
style: form
explode: false
schema:
type: array
items:
type: string
- in: query
name: expand
description: Which fields should be expanded and retrieved in the result.
style: form
explode: false
schema:
type: array
items:
type: string
x-authenticated: true
tags:
- Tax Rate
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
tax_rate:
$ref: ../components/schemas/tax_rate.yaml
post:
operationId: PostTaxRatesTaxRate
summary: Update a Tax Rate
description: Updates a Tax Rate
parameters:
- in: query
name: fields
description: Which fields should be included in the result.
style: form
explode: false
schema:
type: array
items:
type: string
- in: query
name: expand
description: Which fields should be expanded and retrieved in the result.
style: form
explode: false
schema:
type: array
items:
type: string
x-authenticated: true
requestBody:
content:
application/json:
schema:
properties:
code:
type: string
description: A code to identify the tax type by
name:
type: string
description: A human friendly name for the tax
region_id:
type: string
description: The ID of the Region that the rate belongs to
rate:
type: number
description: The numeric rate to charge
products:
type: array
description: The IDs of the products associated with this tax rate
items:
type: string
shipping_options:
type: array
description: The IDs of the shipping options associated with this tax rate
items:
type: string
product_types:
type: array
description: The IDs of the types of products associated with this tax rate
items:
type: string
tags:
- Tax Rate
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
tax_rate:
$ref: ../components/schemas/tax_rate.yaml

View File

@@ -30,3 +30,117 @@ delete:
type: boolean
description: Whether or not the items were deleted.
default: true
get:
operationId: GetTaxRatesTaxRate
summary: Get Tax Rate
description: Retrieves a TaxRate
parameters:
- in: path
name: id
required: true
description: ID of the tax rate.
schema:
type: string
- in: query
name: fields
description: Which fields should be included in the result.
style: form
explode: false
schema:
type: array
items:
type: string
- in: query
name: expand
description: Which fields should be expanded and retrieved in the result.
style: form
explode: false
schema:
type: array
items:
type: string
x-authenticated: true
tags:
- Tax Rate
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
tax_rate:
$ref: ../components/schemas/tax_rate.yaml
post:
operationId: PostTaxRatesTaxRate
summary: Update a Tax Rate
description: Updates a Tax Rate
parameters:
- in: path
name: id
required: true
description: ID of the tax rate.
schema:
type: string
- in: query
name: fields
description: Which fields should be included in the result.
style: form
explode: false
schema:
type: array
items:
type: string
- in: query
name: expand
description: Which fields should be expanded and retrieved in the result.
style: form
explode: false
schema:
type: array
items:
type: string
x-authenticated: true
requestBody:
content:
application/json:
schema:
properties:
code:
type: string
description: A code to identify the tax type by
name:
type: string
description: A human friendly name for the tax
region_id:
type: string
description: The ID of the Region that the rate belongs to
rate:
type: number
description: The numeric rate to charge
products:
type: array
description: The IDs of the products associated with this tax rate
items:
type: string
shipping_options:
type: array
description: The IDs of the shipping options associated with this tax rate
items:
type: string
product_types:
type: array
description: The IDs of the types of products associated with this tax rate
items:
type: string
tags:
- Tax Rate
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
tax_rate:
$ref: ../components/schemas/tax_rate.yaml

View File

@@ -3,6 +3,12 @@ post:
summary: Add Tax Rate to Product Types
description: Associates a Tax Rate with a list of Product Types
parameters:
- in: path
name: id
required: true
description: ID of the tax rate.
schema:
type: string
- in: query
name: fields
description: Which fields should be included in the result.
@@ -50,6 +56,12 @@ delete:
summary: Remove Tax Rate from Product Types
description: Removes a Tax Rate from a list of Product Types
parameters:
- in: path
name: id
required: true
description: ID of the tax rate.
schema:
type: string
- in: query
name: fields
description: Which fields should be included in the result.

View File

@@ -3,6 +3,12 @@ post:
summary: Add Tax Rate to Products
description: Associates a Tax Rate with a list of Products
parameters:
- in: path
name: id
required: true
description: ID of the tax rate.
schema:
type: string
- in: query
name: fields
description: Which fields should be included in the result.
@@ -50,6 +56,12 @@ delete:
summary: Removes Tax Rate from Products
description: Removes a Tax Rate from a list of Products
parameters:
- in: path
name: id
required: true
description: ID of the tax rate.
schema:
type: string
- in: query
name: fields
description: Which fields should be included in the result.

View File

@@ -3,6 +3,12 @@ post:
summary: Add Tax Rate to Product Types
description: Associates a Tax Rate with a list of Shipping Options
parameters:
- in: path
name: id
required: true
description: ID of the tax rate.
schema:
type: string
- in: query
name: fields
description: Which fields should be included in the result.
@@ -50,6 +56,12 @@ delete:
summary: Removes a Tax Rate from Product Types
description: Removes a Tax Rate from a list of Product Types
parameters:
- in: path
name: id
required: true
description: ID of the tax rate.
schema:
type: string
- in: query
name: fields
description: Which fields should be included in the result.