Skip to content

Commit

Permalink
Add support for json-schema to configuration types
Browse files Browse the repository at this point in the history
https://json-schema.org/

Signed-off-by: Bernd Hufmann <[email protected]>
  • Loading branch information
bhufmann committed Sep 9, 2024
1 parent f455f65 commit e06b322
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 11 additions & 2 deletions API-proposed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2168,25 +2168,34 @@ components:
type: string
description: Describes the configuration parameter
description: A list of configuration parameter descriptors to be passed when
creating or updating a configuration instance of this type.
creating or updating a configuration instance of this type. Use this instead
of schema. Omit if not used.
ConfigurationSourceType:
type: object
properties:
parameterDescriptors:
type: array
description: A list of configuration parameter descriptors to be passed
when creating or updating a configuration instance of this type.
when creating or updating a configuration instance of this type. Use this
instead of schema. Omit if not used.
items:
$ref: '#/components/schemas/ConfigurationParameterDescriptor'
description:
type: string
description: Describes the configuration source type
schema:
$ref: '#/components/schemas/OptionalSchema'
name:
type: string
description: The human readable name
id:
type: string
description: The unique ID of the configuration source type
OptionalSchema:
type: object
description: A JSON object that describes a schema for parameters that the front-end
needs to provide with corresponding values. Use this for complex parameter
descriptions instead of parameterDescriptors. Omit if not used.
ConfigurationQueryParameters:
required:
- parameters
Expand Down
13 changes: 11 additions & 2 deletions API.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1475,25 +1475,34 @@ components:
type: string
description: Describes the configuration parameter
description: A list of configuration parameter descriptors to be passed when
creating or updating a configuration instance of this type.
creating or updating a configuration instance of this type. Use this instead
of schema. Omit if not used.
ConfigurationSourceType:
type: object
properties:
parameterDescriptors:
type: array
description: A list of configuration parameter descriptors to be passed
when creating or updating a configuration instance of this type.
when creating or updating a configuration instance of this type. Use this
instead of schema. Omit if not used.
items:
$ref: '#/components/schemas/ConfigurationParameterDescriptor'
description:
type: string
description: Describes the configuration source type
schema:
$ref: '#/components/schemas/OptionalSchema'
name:
type: string
description: The human readable name
id:
type: string
description: The unique ID of the configuration source type
OptionalSchema:
type: object
description: A JSON object that describes a schema for parameters that the front-end
needs to provide with corresponding values. Use this for complex parameter
descriptions instead of parameterDescriptors. Omit if not used.
ConfigurationQueryParameters:
required:
- parameters
Expand Down

0 comments on commit e06b322

Please sign in to comment.