feat(oas): include /admin and /store in paths URLs (#3314)
## What Include `/admin` and `/store` in OAS paths URLs ## Why Allow for generating a combined OAS that include routes for both "admin" and "store" endpoint. Fix potential issues with code generator where routes are not prefixed with "admin" and "store" leading to 404 errors. ## Test * Run `yarn build` * Run `yarn openapi:generate` * Run `yarn redocly preview-docs docs/api/admin/openapi.yaml --config=./docs-util/redocly/config.yaml` * Expect paths to be prefixed with /admin. * Run `yarn redocly preview-docs docs/api/store/openapi.yaml --config=./docs-util/redocly/config.yaml` * Expect paths to be prefixed with /store.
This commit is contained in:
@@ -2,7 +2,7 @@ import { StoreService } from "../../../../services"
|
||||
import { EntityManager } from "typeorm"
|
||||
|
||||
/**
|
||||
* @oas [post] /store/currencies/{code}
|
||||
* @oas [post] /admin/store/currencies/{code}
|
||||
* operationId: "PostStoreCurrenciesCode"
|
||||
* summary: "Add a Currency Code"
|
||||
* description: "Adds a Currency Code to the available currencies."
|
||||
|
||||
@@ -8,7 +8,7 @@ import { FlagRouter } from "../../../../utils/flag-router"
|
||||
import { ModulesHelper } from "../../../../utils/module-helper"
|
||||
|
||||
/**
|
||||
* @oas [get] /store
|
||||
* @oas [get] /admin/store
|
||||
* operationId: "GetStore"
|
||||
* summary: "Get Store details"
|
||||
* description: "Retrieves the Store details"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { PaymentProviderService } from "../../../../services"
|
||||
|
||||
/**
|
||||
* @oas [get] /store/payment-providers
|
||||
* @oas [get] /admin/store/payment-providers
|
||||
* operationId: "GetStorePaymentProviders"
|
||||
* summary: "List Payment Providers"
|
||||
* description: "Retrieves the configured Payment Providers"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { TaxProviderService } from "../../../../services"
|
||||
|
||||
/**
|
||||
* @oas [get] /store/tax-providers
|
||||
* @oas [get] /admin/store/tax-providers
|
||||
* operationId: "GetStoreTaxProviders"
|
||||
* summary: "List Tax Providers"
|
||||
* description: "Retrieves the configured Tax Providers"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { StoreService } from "../../../../services"
|
||||
import { EntityManager } from "typeorm"
|
||||
|
||||
/**
|
||||
* @oas [delete] /store/currencies/{code}
|
||||
* @oas [delete] /admin/store/currencies/{code}
|
||||
* operationId: "DeleteStoreCurrenciesCode"
|
||||
* summary: "Delete a Currency Code"
|
||||
* description: "Removes a Currency Code from the available currencies."
|
||||
|
||||
@@ -5,7 +5,7 @@ import { validator } from "../../../../utils/validator"
|
||||
import { EntityManager } from "typeorm"
|
||||
|
||||
/**
|
||||
* @oas [post] /store
|
||||
* @oas [post] /admin/store
|
||||
* operationId: "PostStore"
|
||||
* summary: "Update Store Details"
|
||||
* description: "Updates the Store details"
|
||||
|
||||
Reference in New Issue
Block a user