chore: add missing error responses to currency OAS (#5627)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2023-11-14 10:18:37 +02:00
1 parent c6dff873de
commit b1826a8e01
2 files changed
+26 -2

No files matched your search

@@ -49,12 +49,24 @@ import { FeatureFlagDecorators } from "../../../../utils/feature-flag-decorators
* tags: * tags:
* - Currencies * - Currencies
* responses: * responses:
* 200: * "200":
* description: OK * description: OK
* content: * content:
* application/json: * application/json:
* schema: * schema:
* $ref: "#/components/schemas/AdminCurrenciesListRes" * $ref: "#/components/schemas/AdminCurrenciesListRes"
* "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"
*/ */
export default async (req: ExtendedRequest<Currency>, res) => { export default async (req: ExtendedRequest<Currency>, res) => {
const currencyService: CurrencyService = req.scope.resolve("currencyService") const currencyService: CurrencyService = req.scope.resolve("currencyService")
@@ -50,12 +50,24 @@ import { EntityManager } from "typeorm"
* tags: * tags:
* - Currencies * - Currencies
* responses: * responses:
* 200: * "200":
* description: OK * description: OK
* content: * content:
* application/json: * application/json:
* schema: * schema:
* $ref: "#/components/schemas/AdminCurrenciesRes" * $ref: "#/components/schemas/AdminCurrenciesRes"
* "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"
*/ */
export default async (req: ExtendedRequest<Currency>, res) => { export default async (req: ExtendedRequest<Currency>, res) => {
const code = req.params.code as string const code = req.params.code as string