From 14587e612f10790951e10a7e893dc54bfd70aa72 Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Wed, 28 Feb 2024 21:04:58 +0100 Subject: [PATCH] fix(openapi): move price to component --- api/v1/openapi.yaml | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/api/v1/openapi.yaml b/api/v1/openapi.yaml index b0d65a2..18f984a 100644 --- a/api/v1/openapi.yaml +++ b/api/v1/openapi.yaml @@ -1,6 +1,6 @@ openapi: "3.1.0" info: - version: 1.0.1 + version: 1.0.2 title: Backoffice API license: name: Proprietary @@ -539,20 +539,9 @@ components: type: object properties: open: - currency: - type: string - enum: [CZK, EUR, USD] - amount: - type: number - format: float + $ref: "#/components/schemas/Price" corporate: - currency: - type: string - enum: [CZK, EUR, USD] - amount: - type: number - format: float - minimum: 0 + $ref: "#/components/schemas/Price" length: type: integer format: int32 @@ -584,14 +573,7 @@ components: type: integer format: int32 price: - type: object - properties: - currency: - type: string - enum: [CZK, EUR, USD] - amount: - type: number - format: float + $ref: "#/components/schemas/Price" required: - date - capacity @@ -650,6 +632,17 @@ components: required: - id + Price: + type: object + properties: + currency: + type: string + enum: [CZK, EUR, USD] + amount: + type: number + format: float + minimum: 0 + Error: type: object properties: