From 486edd8cc9c0ab39211cd3aee68a4a9b95c113ec Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Thu, 29 Aug 2024 14:14:48 -0400 Subject: [PATCH 1/2] Add version change-log in 0011-tsp-analysis-api.md Signed-off-by: Bernd Hufmann --- doc/adr/0011-tsp-analysis-api.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/adr/0011-tsp-analysis-api.md b/doc/adr/0011-tsp-analysis-api.md index 6465e70f..1ede49ee 100644 --- a/doc/adr/0011-tsp-analysis-api.md +++ b/doc/adr/0011-tsp-analysis-api.md @@ -1,11 +1,16 @@ # 11. Tsp analysis api -Date: 2024-05-29 +Date: 2024-08-29 ## Status -Proposed +Proposed - v2 + +Version v1 + Initial version Version v2 + Remove "Configuration service per experiment" + Add "Configure customizable outputs" ## Context From 292c198bd1d96eb9224c2531606fddd76168eac8 Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Thu, 29 Aug 2024 14:33:41 -0400 Subject: [PATCH 2/2] Update 0011-tsp-analysis-api.md for support of json-schema Use a json-schema (https://json-schema.org/) in ConfigurationSourceType to describe the expected parameters to be passed when creating a configuration instance. Signed-off-by: Bernd Hufmann --- doc/adr/0011-tsp-analysis-api.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/adr/0011-tsp-analysis-api.md b/doc/adr/0011-tsp-analysis-api.md index 1ede49ee..f15833e7 100644 --- a/doc/adr/0011-tsp-analysis-api.md +++ b/doc/adr/0011-tsp-analysis-api.md @@ -4,13 +4,15 @@ Date: 2024-08-29 ## Status -Proposed - v2 +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 @@ -49,7 +51,8 @@ ConfigurationSourceType { description: string, id: string, scope: string, - parameterDescriptors: ConfigurationParameterDescriptor[] + parameterDescriptors?: ConfigurationParameterDescriptor[], + schema?: object } ``` @@ -59,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 { @@ -81,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.