[management] Parse resource addr before db write (#3061)

This commit is contained in:
Pascal Fischer
2024-12-17 12:21:28 +01:00
committed by GitHub
parent 712341e73d
commit 228672aed2
6 changed files with 73 additions and 49 deletions

View File

@@ -1272,18 +1272,17 @@ components:
description: Network resource description
type: string
example: A remote resource inside network 1
address:
description: Network resource address (either a direct host like 1.1.1.1 or 1.1.1.1/32, or a subnet like 192.168.178.0/24, or a domain like example.com)
type: string
example: "1.1.1.1"
required:
- name
- address
NetworkResourceRequest:
allOf:
- $ref: '#/components/schemas/NetworkResourceMinimum'
- type: object
properties:
address:
description: Network resource address (either a direct host like 1.1.1.1 or 1.1.1.1/32, or a subnet like 192.168.178.0/24, or a domain like example.com)
type: string
example: "1.1.1.1"
groups:
description: Group IDs containing the resource
type: array
@@ -1292,6 +1291,7 @@ components:
example: "chacdk86lnnboviihd70"
required:
- groups
- address
NetworkResource:
allOf:
- type: object
@@ -1307,10 +1307,20 @@ components:
type: array
items:
$ref: '#/components/schemas/GroupMinimum'
domain:
description: Domain name of the resource
type: string
example: example.com
prefix:
description: Prefix of the resource
type: string
example:
required:
- id
- type
- groups
- domain
- prefix
- $ref: '#/components/schemas/NetworkResourceMinimum'
NetworkResourceType:
description: Network resource type based of the address