docs: fixed errors in OAS comments (#2215)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2022-09-15 16:01:34 +03:00
1 parent 9dcbefd829
commit 7c6521101e
7 files changed
+29 -8

No files matched your search

@@ -6,7 +6,7 @@ import { FeatureFlagDecorators } from "../../../../utils/feature-flag-decorators
import TaxInclusivePricingFeatureFlag from "../../../../loaders/feature-flags/tax-inclusive-pricing" import TaxInclusivePricingFeatureFlag from "../../../../loaders/feature-flags/tax-inclusive-pricing"
/** /**
* @oas [post] /currencies/:code * @oas [post] /currencies/{code}
* operationId: "PostCurrenciesCurrency" * operationId: "PostCurrenciesCurrency"
* summary: "Update a Currency" * summary: "Update a Currency"
* description: "Update a Currency" * description: "Update a Currency"
@@ -20,7 +20,7 @@ import TaxInclusivePricingFeatureFlag from "../../../../loaders/feature-flags/ta
* properties: * properties:
* includes_tax: * includes_tax:
* type: boolean * type: boolean
* description: [EXPERIMENTAL] Tax included in prices of currency. * description: "[EXPERIMENTAL] Tax included in prices of currency."
* tags: * tags:
* - Currency * - Currency
* responses: * responses:
@@ -51,7 +51,7 @@ import { validator } from "../../../../utils/validator"
* tax_rate: * tax_rate:
* description: "The tax rate to use on Orders in the Region." * description: "The tax rate to use on Orders in the Region."
* type: number * type: number
* includes_tax: * includes_tax:
* description: "[EXPERIMENTAL] Tax included in prices of region" * description: "[EXPERIMENTAL] Tax included in prices of region"
* type: boolean * type: boolean
* payment_providers: * payment_providers:
@@ -92,7 +92,7 @@ export class CustomShippingOption extends SoftDeletableEntity {
* type: object * type: object
* description: An optional key-value map with additional details * description: An optional key-value map with additional details
* example: {car: "white"} * example: {car: "white"}
* includes_tax: * includes_tax:
* description: "[EXPERIMENTAL] Indicates if the custom shipping option price include tax" * description: "[EXPERIMENTAL] Indicates if the custom shipping option price include tax"
* type: boolean * type: boolean
*/ */
+1 -1
View File
@@ -97,7 +97,7 @@ export class OrderEdit extends SoftDeletableEntity {
* type: array * type: array
* description: Line item changes array. * description: Line item changes array.
* items: * items:
* $ref: "#/components/schemas/order_item_changes" * $ref: "#/components/schemas/order_item_change"
* internal_note: * internal_note:
* description: "An optional note with additional details about the order edit." * description: "An optional note with additional details about the order edit."
* type: string * type: string
+1 -1
View File
@@ -449,7 +449,7 @@ export class Order extends BaseEntity {
* $ref: "#/components/schemas/line_item" * $ref: "#/components/schemas/line_item"
* edits: * edits:
* type: array * type: array
* description: [EXPERIMENTAL] Order edits done on the order. Available if the relation `edits` is expanded. * description: "[EXPERIMENTAL] Order edits done on the order. Available if the relation `edits` is expanded."
* items: * items:
* $ref: "#/components/schemas/order_edit" * $ref: "#/components/schemas/order_edit"
* gift_card_transactions: * gift_card_transactions:
+3 -2
View File
@@ -122,8 +122,9 @@ export class PriceList extends SoftDeletableEntity {
* description: The Money Amounts that are associated with the Price List. Available if the relation `prices` is expanded. * description: The Money Amounts that are associated with the Price List. Available if the relation `prices` is expanded.
* type: array * type: array
* items: * items:
* $ref: "#/components/schemas/money_amount" * oneOf:
* $ref: "#/components/schemas/customer_group" * - $ref: "#/components/schemas/money_amount"
* - $ref: "#/components/schemas/customer_group"
* includes_tax: * includes_tax:
* description: "[EXPERIMENTAL] Does the price list prices include tax" * description: "[EXPERIMENTAL] Does the price list prices include tax"
* type: boolean * type: boolean
+20
View File
@@ -28,6 +28,11 @@ swaggerInline(
process.exit(1) process.exit(1)
}) })
}) })
.catch((err) => {
console.log("Error in store")
console.error(err)
process.exit(1)
});
swaggerInline( swaggerInline(
["./packages/medusa/src/models", "./packages/medusa/src/api/middlewares" , "./packages/medusa/src/api/routes/store"], ["./packages/medusa/src/models", "./packages/medusa/src/api/middlewares" , "./packages/medusa/src/api/routes/store"],
@@ -48,6 +53,11 @@ swaggerInline(
console.log('No errors occurred while generating Store API Reference'); console.log('No errors occurred while generating Store API Reference');
} }
}) })
.catch((err) => {
console.log("Error in store")
console.error(err)
process.exit(1)
})
// Admin API // Admin API
swaggerInline( swaggerInline(
@@ -70,6 +80,11 @@ swaggerInline(
process.exit(1) process.exit(1)
}) })
}) })
.catch((err) => {
console.log("Error in admin")
console.error(err)
process.exit(1)
})
swaggerInline( swaggerInline(
["./packages/medusa/src/models", "./packages/medusa/src/api/middlewares" , "./packages/medusa/src/api/routes/admin"], ["./packages/medusa/src/models", "./packages/medusa/src/api/middlewares" , "./packages/medusa/src/api/routes/admin"],
@@ -91,3 +106,8 @@ swaggerInline(
console.log('No errors occurred while generating Admin API Reference'); console.log('No errors occurred while generating Admin API Reference');
} }
}) })
.catch((err) => {
console.log("Error in admin")
console.error(err)
process.exit(1)
})