Co-authored-by: Michael Hoennig <michael@hoennig.de> Reviewed-on: #62 Reviewed-by: Marc Sandlus <marc.sandlus@hostsharing.net>
117 lines
3.3 KiB
YAML
117 lines
3.3 KiB
YAML
|
|
components:
|
|
|
|
schemas:
|
|
|
|
HsBookingItemType:
|
|
type: string
|
|
enum:
|
|
- PRIVATE_CLOUD
|
|
- CLOUD_SERVER
|
|
- MANAGED_SERVER
|
|
- MANAGED_WEBSPACE
|
|
|
|
HsBookingItem:
|
|
type: object
|
|
properties:
|
|
uuid:
|
|
type: string
|
|
format: uuid
|
|
type:
|
|
$ref: '#/components/schemas/HsBookingItemType'
|
|
caption:
|
|
type: string
|
|
validFrom:
|
|
type: string
|
|
format: date
|
|
validTo:
|
|
type: string
|
|
format: date
|
|
resources:
|
|
$ref: '#/components/schemas/BookingResources'
|
|
required:
|
|
- uuid
|
|
- validFrom
|
|
- validTo
|
|
- resources
|
|
|
|
HsBookingItemPatch:
|
|
type: object
|
|
properties:
|
|
caption:
|
|
type: string
|
|
nullable: true
|
|
validTo:
|
|
type: string
|
|
format: date
|
|
nullable: true
|
|
resources:
|
|
$ref: '#/components/schemas/BookingResources'
|
|
|
|
HsBookingItemInsert:
|
|
type: object
|
|
properties:
|
|
projectUuid:
|
|
type: string
|
|
format: uuid
|
|
nullable: false
|
|
type:
|
|
$ref: '#/components/schemas/HsBookingItemType'
|
|
caption:
|
|
type: string
|
|
minLength: 3
|
|
maxLength: 80
|
|
nullable: false
|
|
validTo:
|
|
type: string
|
|
format: date
|
|
nullable: true
|
|
resources:
|
|
$ref: '#/components/schemas/BookingResources'
|
|
required:
|
|
- caption
|
|
- projectUuid
|
|
- validFrom
|
|
- resources
|
|
additionalProperties: false
|
|
|
|
BookingResources:
|
|
anyOf:
|
|
- $ref: '#/components/schemas/ManagedServerBookingResources'
|
|
- $ref: '#/components/schemas/ManagedWebspaceBookingResources'
|
|
|
|
ManagedServerBookingResources:
|
|
type: object
|
|
properties:
|
|
CPU:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 16
|
|
SSD:
|
|
type: integer
|
|
minimum: 16
|
|
maximum: 4096
|
|
HDD:
|
|
type: integer
|
|
minimum: 16
|
|
maximum: 4096
|
|
additionalProperties: false
|
|
|
|
ManagedWebspaceBookingResources:
|
|
type: object
|
|
properties:
|
|
disk:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 16
|
|
SSD:
|
|
type: integer
|
|
minimum: 16
|
|
maximum: 4096
|
|
HDD:
|
|
type: integer
|
|
minimum: 16
|
|
maximum: 4096
|
|
additionalProperties: false
|
|
|