1
0
Michael Hoennig 60341bf644 add DomainSetup-HostingAssets for new BookingItem via created-event ()
Co-authored-by: Michael Hoennig <michael@hoennig.de>
Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/111
Reviewed-by: Timotheus Pokorra <timotheus.pokorra@hostsharing.net>
2024-10-08 11:48:31 +02:00

247 lines
8.0 KiB
YAML

components:
schemas:
HsHostingAssetType:
type: string
enum:
- CLOUD_SERVER
- MANAGED_SERVER
- MANAGED_WEBSPACE
- UNIX_USER
- DOMAIN_SETUP
- DOMAIN_DNS_SETUP
- DOMAIN_HTTP_SETUP
- DOMAIN_SMTP_SETUP
- DOMAIN_MBOX_SETUP
- EMAIL_ALIAS
- EMAIL_ADDRESS
- PGSQL_INSTANCE
- PGSQL_USER
- PGSQL_DATABASE
- MARIADB_INSTANCE
- MARIADB_USER
- MARIADB_DATABASE
- IPV4_NUMBER
- IPV6_NUMBER
HsHostingAsset:
type: object
properties:
uuid:
type: string
format: uuid
type:
$ref: '#/components/schemas/HsHostingAssetType'
identifier:
type: string
caption:
type: string
alarmContact:
$ref: '../hs-office/hs-office-contact-schemas.yaml#/components/schemas/HsOfficeContact'
config:
$ref: '#/components/schemas/HsHostingAssetConfiguration'
required:
- type
- ídentifier
- uuid
- config
HsHostingAssetPatch:
type: object
properties:
caption:
type: string
nullable: true
alarmContactUuid:
type: string
format: uuid
nullable: true
config:
$ref: '#/components/schemas/HsHostingAssetConfiguration'
HsHostingAssetInsert:
type: object
properties:
bookingItemUuid:
type: string
format: uuid
nullable: true
parentAssetUuid:
type: string
format: uuid
nullable: true
type:
$ref: '#/components/schemas/HsHostingAssetType'
identifier:
type: string
minLength: 3
maxLength: 80
nullable: false
caption:
type: string
minLength: 3
maxLength: 80
nullable: false
alarmContactUuid:
type: string
format: uuid
nullable: true
config:
$ref: '#/components/schemas/HsHostingAssetConfiguration'
required:
- type
- identifier
- caption
additionalProperties: false
HsHostingAssetAutoInsert:
type: object
properties:
parentAssetUuid:
type: string
format: uuid
nullable: true
assignedToAssetUuid:
type: string
format: uuid
type:
$ref: '#/components/schemas/HsHostingAssetType'
identifier:
type: string
minLength: 3
maxLength: 80
nullable: false
caption:
type: string
minLength: 3
maxLength: 80
nullable: false
alarmContactUuid:
type: string
format: uuid
nullable: true
config:
$ref: '#/components/schemas/HsHostingAssetConfiguration'
subHostingAssets:
type: array
items:
$ref: '#/components/schemas/HsHostingAssetSubInsert'
required:
- identifier
additionalProperties: false
HsHostingAssetSubInsert:
type: object
properties:
type:
$ref: '#/components/schemas/HsHostingAssetType'
identifier:
type: string
minLength: 3
maxLength: 80
nullable: false
caption:
type: string
minLength: 3
maxLength: 80
nullable: false
assignedToAssetUuid:
type: string
format: uuid
alarmContactUuid:
type: string
format: uuid
nullable: true
config:
$ref: '#/components/schemas/HsHostingAssetConfiguration'
additionalProperties: false
HsHostingAssetConfiguration:
# forces generating a java.lang.Object containing a Map, instead of class AssetConfiguration
anyOf:
- type: object
# single source of supported properties just via /api/hs/hosting/asset-types/{assetType}
# TODO.impl: later, we could generate the config types and their properties from the validation config
additionalProperties: true
PropertyDescriptor:
type: object
properties:
"type":
type: string
enum:
- integer
- boolean
- enumeration
"propertyName":
type: string
pattern: "^[ a-zA-Z0-9_-]$"
"required":
type: boolean
required:
- type
- propertyName
- required
IntegerPropertyDescriptor:
allOf:
- $ref: '#/components/schemas/PropertyDescriptor'
- type: object
properties:
"type":
type: string
enum:
- integer
"unit":
type: string
"min":
type: integer
minimum: 0
"max":
type: integer
minimum: 0
"step":
type: integer
minimum: 1
required:
- "type"
- "propertyName"
- "required"
BooleanPropertyDescriptor:
allOf:
- $ref: '#/components/schemas/PropertyDescriptor'
- type: object
properties:
"type":
type: string
enum:
- boolean
"falseIf":
type: object
anyOf:
- type: object
additionalProperties: true
EnumerationPropertyDescriptor:
allOf:
- $ref: '#/components/schemas/PropertyDescriptor'
- type: object
properties:
"type":
type: string
enum:
- enumeration
"values":
type: array
items:
type: string
HsHostingAssetProps:
anyOf:
- $ref: '#/components/schemas/IntegerPropertyDescriptor'
- $ref: '#/components/schemas/BooleanPropertyDescriptor'
- $ref: '#/components/schemas/EnumerationPropertyDescriptor'