From ada55b07572429891001052326df4af172fc4269 Mon Sep 17 00:00:00 2001 From: Matt Weaver Date: Thu, 8 Feb 2024 14:08:04 -0500 Subject: [PATCH] MODFQMMGR-134 Add a value source API property for columns This new property will allow us to configure an API endpoint as the source of available values for a column --- pom.xml | 2 +- .../swagger.api/schemas/entityTypeColumn.json | 4 +++ .../swagger.api/schemas/valueSourceApi.json | 25 +++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/swagger.api/schemas/valueSourceApi.json diff --git a/pom.xml b/pom.xml index d770bf2..256ec24 100644 --- a/pom.xml +++ b/pom.xml @@ -187,7 +187,7 @@ true true true - entityDataType,arrayType,dateType,entityTypeRelation,objectType,entityTypeColumn,enumType,booleanType,entityType,integerType,openUUIDType,stringType,numberType,rangedUUIDType,valueWithLabel,entityTypeDefaultSort,errors,error,parameters,parameter,resultsetPage,queryDetails,queryIdentifier,sourceColumn,columnValues,columnValueGetter,submitQuery,contentsRequest + entityDataType,arrayType,dateType,entityTypeRelation,objectType,entityTypeColumn,enumType,booleanType,entityType,integerType,openUUIDType,stringType,numberType,rangedUUIDType,valueWithLabel,entityTypeDefaultSort,errors,error,parameters,parameter,resultsetPage,queryDetails,queryIdentifier,sourceColumn,valueSourceApi,columnValues,columnValueGetter,submitQuery,contentsRequest false true true diff --git a/src/main/resources/swagger.api/schemas/entityTypeColumn.json b/src/main/resources/swagger.api/schemas/entityTypeColumn.json index 065b32b..58e6de3 100644 --- a/src/main/resources/swagger.api/schemas/entityTypeColumn.json +++ b/src/main/resources/swagger.api/schemas/entityTypeColumn.json @@ -35,6 +35,10 @@ "description": "Reference to the root entity type column, from where the values of this column are sourced.", "$ref": "sourceColumn.json" }, + "valueSourceApi": { + "description": "Configuration defining where the available values for a column can be accessed", + "$ref": "valueSourceApi.json" + }, "valueGetter": { "description": "Configuration defining how to fetch values of this column from the underlying datasource.", "type": "string" diff --git a/src/main/resources/swagger.api/schemas/valueSourceApi.json b/src/main/resources/swagger.api/schemas/valueSourceApi.json new file mode 100644 index 0000000..fbbfa7f --- /dev/null +++ b/src/main/resources/swagger.api/schemas/valueSourceApi.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Value source API config", + "description": "Configuration for a column's value source API, where the available values can be accessed", + "type": "object", + "properties": { + "path": { + "description": "Relative path to the FOLIO module API endpoint that can provide the available column values. Example: 'material-types'", + "type": "string" + }, + "valueJsonPath": { + "description": "JsonPath defining how to access the values provided by the API", + "type": "string" + }, + "labelJsonPath": { + "description": "JsonPath defining how to access the labels for the values provided by the API", + "type": "string" + } + }, + "required": [ + "path", + "valueJsonPath", + "labelJsonPath" + ] +}