From adadbbb9ab330d063046e398131bcaa5478ac146 Mon Sep 17 00:00:00 2001 From: Matt Weaver Date: Thu, 8 Aug 2024 09:43:42 -0700 Subject: [PATCH] MODFQMMGR-378 Update approach to enabling ECS for an entity type This commit adds a new boolean crossTenantQueriesEnabled property to entity types, to control when an entity type supports cross-query queries. It also changes the shape of the entity type column "source" property's object model, adding a new "type" property. This new property will allow us to use the "source" to define value sources that come from things besides entity types. There's also a new "name" property, which is for setting the name of the value provider within the source type --- pom.xml | 2 +- .../swagger.api/schemas/entityType.json | 7 ++++--- .../swagger.api/schemas/sourceColumn.json | 18 +++++++++++++++--- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 460af88..b298731 100644 --- a/pom.xml +++ b/pom.xml @@ -197,7 +197,7 @@ true true true - entityDataType,arrayType,dateType,entityTypeRelation,objectType,nestedObjectProperty,entityTypeColumn,enumType,booleanType,entityType,integerType,openUUIDType,stringType,numberType,rangedUUIDType,valueWithLabel,entityTypeDefaultSort,errors,error,parameters,parameter,resultsetPage,queryDetails,queryIdentifier,sourceColumn,valueSourceApi,columnValues,columnValueGetter,submitQuery,contentsRequest,field,entityTypeSource,entityTypeSourceJoin,stringUUIDType,entityTypeCrossTenantQueryConfig + entityDataType,arrayType,dateType,entityTypeRelation,objectType,nestedObjectProperty,entityTypeColumn,enumType,booleanType,entityType,integerType,openUUIDType,stringType,numberType,rangedUUIDType,valueWithLabel,entityTypeDefaultSort,errors,error,parameters,parameter,resultsetPage,queryDetails,queryIdentifier,sourceColumn,valueSourceApi,columnValues,columnValueGetter,submitQuery,contentsRequest,field,entityTypeSource,entityTypeSourceJoin,stringUUIDType false true true diff --git a/src/main/resources/swagger.api/schemas/entityType.json b/src/main/resources/swagger.api/schemas/entityType.json index fc687da..5fac9a8 100644 --- a/src/main/resources/swagger.api/schemas/entityType.json +++ b/src/main/resources/swagger.api/schemas/entityType.json @@ -43,9 +43,10 @@ }, "default": [] }, - "crossTenantQueryConfig": { - "description": "Cross-tenant query config for this entity type. Cross-tenant queries are not supported for entity types without this property.", - "$ref": "entityTypeCrossTenantQueryConfig.json" + "crossTenantQueriesEnabled": { + "description": "Indicates if this entity type supports cross-tenant queries", + "type": "boolean", + "default": false }, "defaultSort": { "type": "array", diff --git a/src/main/resources/swagger.api/schemas/sourceColumn.json b/src/main/resources/swagger.api/schemas/sourceColumn.json index 8ba4e55..13747ce 100644 --- a/src/main/resources/swagger.api/schemas/sourceColumn.json +++ b/src/main/resources/swagger.api/schemas/sourceColumn.json @@ -5,7 +5,20 @@ "type": "object", "properties": { "entityTypeId": { - "description": "A UUID identifying the source entity type", + "description": "A UUID identifying the source entity type.", + "type": "string" + }, + "type": { + "description": "Name of the source type. Possible values: entity-type, fqm. Default: entity-type", + "type": "string", + "default": "entity-type", + "enum": [ + "entity-type", + "fqm" + ] + }, + "name": { + "description": "Name of the source within the source type (e.g., 'currency')", "type": "string" }, "columnName": { @@ -14,7 +27,6 @@ } }, "required": [ - "entityTypeId", - "columnName" + "entityTypeId", "columnName" ] }