feat(api): add pricing to training
This commit is contained in:
parent
f7572c5007
commit
063ae710e6
1 changed files with 35 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
openapi: "3.0.3"
|
openapi: "3.0.3"
|
||||||
info:
|
info:
|
||||||
title: "Backoffice API"
|
title: "Backoffice API"
|
||||||
version: "0.1.0"
|
version: "0.2.0"
|
||||||
license:
|
license:
|
||||||
name: Proprietary
|
name: Proprietary
|
||||||
contact:
|
contact:
|
||||||
|
|
@ -171,10 +171,15 @@ components:
|
||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 5
|
maximum: 5
|
||||||
default: 1
|
default: 1
|
||||||
|
pricing:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/TrainingPrice"
|
||||||
required:
|
required:
|
||||||
- title
|
- title
|
||||||
- description
|
- description
|
||||||
- days
|
- days
|
||||||
|
- pricing
|
||||||
Training:
|
Training:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/NewTraining"
|
- $ref: "#/components/schemas/NewTraining"
|
||||||
|
|
@ -191,6 +196,35 @@ components:
|
||||||
- slug
|
- slug
|
||||||
- published
|
- published
|
||||||
- retired
|
- 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:
|
ProblemDetails:
|
||||||
type: object
|
type: object
|
||||||
description: >
|
description: >
|
||||||
|
|
|
||||||
Reference in a new issue