diff --git a/doc/adr/0011-tsp-analysis-api.md b/doc/adr/0011-tsp-analysis-api.md index 6465e70f..f15833e7 100644 --- a/doc/adr/0011-tsp-analysis-api.md +++ b/doc/adr/0011-tsp-analysis-api.md @@ -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 @@ -44,7 +51,8 @@ ConfigurationSourceType { description: string, id: string, scope: string, - parameterDescriptors: ConfigurationParameterDescriptor[] + parameterDescriptors?: ConfigurationParameterDescriptor[], + schema?: object } ``` @@ -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 { @@ -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.