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

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

View File

@@ -49,12 +49,24 @@ import { FeatureFlagDecorators } from "../../../../utils/feature-flag-decorators
* tags:
* - Currencies
* responses:
* 200:
* "200":
* description: OK
* content:
* application/json:
* schema:
* $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) => {
const currencyService: CurrencyService = req.scope.resolve("currencyService")

View File

@@ -50,12 +50,24 @@ import { EntityManager } from "typeorm"
* tags:
* - Currencies
* responses:
* 200:
* "200":
* description: OK
* content:
* application/json:
* schema:
* $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) => {
const code = req.params.code as string