diff --git a/api/openapi.yaml b/api/openapi.yaml index 0c5f7b4..306a85b 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: title: "Backoffice API" - version: "0.1.0" + version: "0.2.0" license: name: Proprietary contact: @@ -171,10 +171,15 @@ components: minimum: 1 maximum: 5 default: 1 + pricing: + type: array + items: + $ref: "#/components/schemas/TrainingPrice" required: - title - description - days + - pricing Training: allOf: - $ref: "#/components/schemas/NewTraining" @@ -191,6 +196,35 @@ components: - slug - published - retired + TrainingPrice: + allOf: + - $ref: "#/components/schemas/Price" + - type: object + properties: + type: + type: string + enum: + - OPEN + - CORPORATE + required: + - type + Price: + type: object + properties: + currency: + type: string + enum: + - CZK + - EUR + - USD + x-go-type: currency.Currency + x-go-type-package: + path: gitlab.mareshq.com/hq/backoffice/backoffice-api/internal/currency + amount: + type: string + required: + - currency + - amount ProblemDetails: type: object description: >