Skip to content

Update Validation for Autoentities#3152

Merged
RubenCerna2079 merged 51 commits intomainfrom
dev/rubencerna/update-validation-autoentities
Mar 7, 2026
Merged

Update Validation for Autoentities#3152
RubenCerna2079 merged 51 commits intomainfrom
dev/rubencerna/update-validation-autoentities

Conversation

@RubenCerna2079
Copy link
Contributor

@RubenCerna2079 RubenCerna2079 commented Feb 21, 2026

Why make this change?

  • Update Validation for Autoentities #3131
  • Entity validation (REST path uniqueness, GraphQL type uniqueness, permissions) ran in Startup.cs before autoentity generation, so conflicts between manually defined and auto-generated entities were never caught.

What is this change?

  • Validation reordered: ValidatePermissionsInConfig and ValidateEntityConfiguration removed from Startup.cs; both now execute inside SqlMetadataProvider.InitializeAsync() after GenerateAutoentitiesIntoEntities() completes, ensuring the full entity set (manual + auto-generated) is validated together.

  • New ValidateEntityAndAutoentityConfigurations method on RuntimeConfigValidator: consolidates REST/GraphQL path uniqueness, duplicate query/mutation detection, and permissions validation — runs in development mode only, consistent with prior behavior.

  • RuntimeConfigValidator injected into SqlMetadataProvider (and subclasses MsSqlMetadataProvider, PostgreSqlMetadataProvider, MySqlMetadataProvider) to enable calling the new method at the correct point in the init sequence.

  • dab validate flow: ValidateEntitiesMetadata now passes the validator into metadata provider initialization, so dab validate also validates entity/autoentity configurations post-generation.

  • CosmosDB: ValidateEntityAndAutoentityConfigurations added to CosmosSqlMetadataProvider.InitializeAsync() for consistency.

How was this tested?

  • Integration Tests
  • Unit Tests

@RubenCerna2079 RubenCerna2079 added this to the Feb 2026 milestone Feb 21, 2026
@RubenCerna2079 RubenCerna2079 self-assigned this Feb 21, 2026
@RubenCerna2079 RubenCerna2079 changed the title Update validation for autoentities Update Validation for Autoentities Feb 21, 2026
@RubenCerna2079 RubenCerna2079 linked an issue Feb 21, 2026 that may be closed by this pull request
@RubenCerna2079 RubenCerna2079 marked this pull request as ready for review February 23, 2026 04:37
@RubenCerna2079 RubenCerna2079 force-pushed the dev/rubencerna/update-validation-autoentities branch from 7445062 to 5a0b722 Compare February 25, 2026 20:44
anushakolan
anushakolan previously approved these changes Feb 26, 2026
Copy link
Contributor

@anushakolan anushakolan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Base automatically changed from dev/rubencerna/create-inmemory-entities-from-autoentities to main February 26, 2026 19:48
@RubenCerna2079 RubenCerna2079 dismissed anushakolan’s stale review February 26, 2026 19:48

The base branch was changed.

Copilot AI review requested due to automatic review settings February 26, 2026 20:40
@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@Aniruddh25
Copy link
Collaborator

@copilot, describe what this change is and edit the PR description to add that in the What is this change? section.

Copilot AI mentioned this pull request Mar 7, 2026
2 tasks
Copy link
Contributor

Copilot AI commented Mar 7, 2026

@Aniruddh25 I've opened a new pull request, #3205, to work on those changes. Once the pull request is ready, I'll request review from you.

@RubenCerna2079 RubenCerna2079 merged commit b2310d0 into main Mar 7, 2026
11 checks passed
@RubenCerna2079 RubenCerna2079 deleted the dev/rubencerna/update-validation-autoentities branch March 7, 2026 18:17
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Data API builder Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update Validation for Autoentities

5 participants