Skip to content

Commit

Permalink
MODFQMMGR-134 Add a value source API property for columns
Browse files Browse the repository at this point in the history
This new property will allow us to configure an API endpoint as the
source of available values for a column
  • Loading branch information
mweaver-ebsco committed Feb 8, 2024
1 parent 805d458 commit ada55b0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
<generateApiTests>true</generateApiTests>
<generateApiDocumentation>true</generateApiDocumentation>
<generateModels>true</generateModels>
<modelsToGenerate>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</modelsToGenerate>
<modelsToGenerate>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</modelsToGenerate>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>true</generateModelDocumentation>
<generateSupportingFiles>true</generateSupportingFiles>
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/swagger.api/schemas/entityTypeColumn.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
25 changes: 25 additions & 0 deletions src/main/resources/swagger.api/schemas/valueSourceApi.json
Original file line number Diff line number Diff line change
@@ -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"
]
}

0 comments on commit ada55b0

Please sign in to comment.