Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
38 changes: 38 additions & 0 deletions src/Cli.Tests/AddEntityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public Task AddNewEntityWhenEntitiesEmpty()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -80,6 +82,8 @@ public Task AddNewEntityWhenEntitiesNotEmpty()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -120,6 +124,8 @@ public void AddDuplicateEntity()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -164,6 +170,8 @@ public Task AddEntityWithAnExistingNameButWithDifferentCase()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -203,6 +211,8 @@ public Task AddEntityWithCachingEnabled()
policyDatabase: null,
cacheEnabled: "true",
cacheTtl: "1",
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -249,6 +259,8 @@ public Task AddEntityWithPolicyAndFieldProperties(
config: TEST_RUNTIME_CONFIG_FILE,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
parametersNameCollection: null,
Expand Down Expand Up @@ -290,6 +302,8 @@ public Task AddNewEntityWhenEntitiesWithSourceAsStoredProcedure()
config: TEST_RUNTIME_CONFIG_FILE,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
parametersNameCollection: null,
Expand Down Expand Up @@ -329,6 +343,8 @@ public Task TestAddStoredProcedureWithRestMethodsAndGraphQLOperations()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: new string[] { "Post", "Put", "Patch" },
graphQLOperationForStoredProcedure: "Query",
Expand Down Expand Up @@ -365,6 +381,8 @@ public void AddEntityWithDescriptionAndVerifyInConfig()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -428,6 +446,8 @@ public void TestAddNewEntityWithSourceObjectHavingValidFields(
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -496,6 +516,8 @@ public Task TestAddNewSpWithDifferentRestAndGraphQLOptions(
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: restMethods,
graphQLOperationForStoredProcedure: graphQLOperation,
Expand Down Expand Up @@ -540,6 +562,8 @@ public void TestAddStoredProcedureWithConflictingRestGraphQLOptions(
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: restMethods,
graphQLOperationForStoredProcedure: graphQLOperation,
Expand Down Expand Up @@ -587,6 +611,8 @@ public void TestAddEntityPermissionWithInvalidOperation(IEnumerable<string> perm
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -660,6 +686,8 @@ public Task AddTableEntityWithMcpDmlTools(string mcpDmlTools, string source, str
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -702,6 +730,8 @@ public Task AddStoredProcedureWithMcpCustomToolEnabled()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -741,6 +771,8 @@ public Task AddStoredProcedureWithBothMcpProperties()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -780,6 +812,8 @@ public Task AddStoredProcedureWithBothMcpPropertiesEnabled()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -819,6 +853,8 @@ public void AddTableEntityWithInvalidMcpCustomTool()
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down Expand Up @@ -865,6 +901,8 @@ public void AddEntityWithInvalidMcpOptions(string? mcpDmlTools, string? mcpCusto
policyDatabase: null,
cacheEnabled: null,
cacheTtl: null,
cacheLevel: null,
healthEnabled: null,
config: TEST_RUNTIME_CONFIG_FILE,
restMethodsForStoredProcedure: null,
graphQLOperationForStoredProcedure: null,
Expand Down
Loading
Loading