Skip to content
2 changes: 1 addition & 1 deletion schemas/dab.draft.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@
},
"description": "DEPRECATED. Use the 'fields' array and set 'primary-key: true' on each key field instead. List of fields to be used as primary keys."
},
"object-description": {
"description": {
"type": "string",
"description": "Human-readable description of the database object, used for MCP tool discovery and documentation."
}
Expand Down
76 changes: 57 additions & 19 deletions src/Cli.Tests/AddEntityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public Task AddNewEntityWhenEntitiesEmpty()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -79,7 +81,9 @@ public Task AddNewEntityWhenEntitiesNotEmpty()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -119,7 +123,9 @@ public void AddDuplicateEntity()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -163,7 +169,9 @@ public Task AddEntityWithAnExistingNameButWithDifferentCase()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -202,7 +210,9 @@ public Task AddEntityWithCachingEnabled()
policyRequest: null,
policyDatabase: null,
cacheEnabled: "true",
cacheTtl: "1",
cacheTtlSeconds: "1",
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -248,7 +258,9 @@ public Task AddEntityWithPolicyAndFieldProperties(
policyDatabase: policyDatabase,
config: TEST_RUNTIME_CONFIG_FILE,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
parametersNameCollection: null,
Expand Down Expand Up @@ -289,7 +301,9 @@ public Task AddNewEntityWhenEntitiesWithSourceAsStoredProcedure()
policyDatabase: null,
config: TEST_RUNTIME_CONFIG_FILE,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
parametersNameCollection: null,
Expand Down Expand Up @@ -328,7 +342,9 @@ public Task TestAddStoredProcedureWithRestMethodsAndGraphQLOperations()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: new string[] { "Post", "Put", "Patch" },
graphQLOperationForStoredProcedure: "Query",
Expand Down Expand Up @@ -364,7 +380,9 @@ public void AddEntityWithDescriptionAndVerifyInConfig()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -427,7 +445,9 @@ public void TestAddNewEntityWithSourceObjectHavingValidFields(
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -495,7 +515,9 @@ public Task TestAddNewSpWithDifferentRestAndGraphQLOptions(
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: restMethods,
graphQLOperationForStoredProcedure: graphQLOperation,
Expand Down Expand Up @@ -539,7 +561,9 @@ public void TestAddStoredProcedureWithConflictingRestGraphQLOptions(
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: restMethods,
graphQLOperationForStoredProcedure: graphQLOperation,
Expand Down Expand Up @@ -586,7 +610,9 @@ public void TestAddEntityPermissionWithInvalidOperation(IEnumerable<string> perm
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -659,7 +685,9 @@ public Task AddTableEntityWithMcpDmlTools(string mcpDmlTools, string source, str
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -701,7 +729,9 @@ public Task AddStoredProcedureWithMcpCustomToolEnabled()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -740,7 +770,9 @@ public Task AddStoredProcedureWithBothMcpProperties()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -779,7 +811,9 @@ public Task AddStoredProcedureWithBothMcpPropertiesEnabled()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -818,7 +852,9 @@ public void AddTableEntityWithInvalidMcpCustomTool()
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -864,7 +900,9 @@ public void AddEntityWithInvalidMcpOptions(string? mcpDmlTools, string? mcpCusto
policyRequest: null,
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheTtlSeconds: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down
Loading
Loading