Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update adr json schema #1108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions doc/adr/0011-tsp-analysis-api.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# 11. Tsp analysis api

Date: 2024-05-29
Date: 2024-08-29

## Status

Proposed
Proposed - v3

Version v1
Initial version
Version v2
Remove "Configuration service per experiment"
Add "Configure customizable outputs"
Version v3
Support of json-schema for configuration source types

## Context

Expand Down Expand Up @@ -44,7 +51,8 @@ ConfigurationSourceType {
description: string,
id: string,
scope: string,
parameterDescriptors: ConfigurationParameterDescriptor[]
parameterDescriptors?: ConfigurationParameterDescriptor[],
schema?: object
}
```

Expand All @@ -54,11 +62,14 @@ Where:
- `description`: The description of the configuration source type. Can be shown to the end-user.
- `id`: Unique id of the configuration source type. Used in the application to distinquish configuration source types
- `scope:` `experiment` for configuration source types per experiment or `global` for all experiments
- `parameterDescriptors`: A list of descriptors that describe the parameters that the front-end needs to provide with corresponding values. For example, use "path" for file path.
- `parameterDescriptors`: A list of descriptors that describe the parameters that the front-end needs to provide with corresponding values. For example, use "path" for file path. Use this instead of `schema`.
- `schema`: a JSON schema object that describes the parameters that the front-end needs to provide with corresponding values. Use this for complex parameter descriptions instead of `parameterDescriptors`.

Note: One of `parameterDescriptors` and `schema` must be present.

#### Configuration parameter descriptor

The configuration parameter descriptor describes a parameter that the front-end needs to provide with corresponding values. This descriptor will help implementing a UI for the parameters.
The configuration parameter descriptor describes a parameter that the front-end needs to provide with corresponding values. This descriptor will help implementing a UI for the parameters. Use this for simple parameters. For complex parameter descriptions use a [json-schema](#configuration-parameter-schema) instead.

```javascript
ConfigurationParameterDescriptor {
Expand All @@ -76,6 +87,10 @@ Where:
- `dataType`: A data type hint to the client. Helps implementing validation of values in the front-end.
- `isRequired`: A flag indicating whether parameter is required or not.

#### Configuration parameter schema

The configuration parameter schema describes parameters that the front-end needs to provide with corresponding values. This descriptor will help implementing a UI for the parameters. Use this for complex parameter descriptions use a [json-schema](#configuration-parameter-schema) and omit the list of [configuration parameter descriptors](#configuration-parameter-descriptor). The schema string has to comply with the [json-schema specification](https://json-schema.org/)

#### Configuration descriptor

The configuration descriptor describes an instance of an external configuration for a given source type. This descriptor is used to distinquish the different external configurations for a given type.
Expand Down
Loading