Skip to content

Add Swagger metadata compatibility tests and fix nullable overwrites - #11181

Merged
vicancy merged 6 commits into
dotnet:mainfrom
vicancy:codex/rest-view-models
Sep 24, 2026
Merged

vicancy merged 6 commits into
dotnet:mainfrom
vicancy:codex/rest-view-models

Conversation

@vicancy

@vicancy vicancy commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Add a Swagger 2.0 compatibility baseline for #11154. Tests cover flexible info values, access through the existing metadata dictionaries, and metadata inheritance and overwrites with tag and operation splitting. They preserve the input shapes accepted by the current implementation, including values outside the Swagger specification.

Fix nullable property overwrites that currently discard explicit false and 0 values. Omitted nullable values continue to preserve the original value; both merge and replace behavior are covered.

The production diff is limited to two conditions in ReflectionEntityMerger; the remaining changes add tests in three existing test files.

Validation: 94 REST tests, 23 splitting/HTML compatibility tests and 5 entity-merger tests pass on each of .NET 8 and .NET 10. Existing HTML checks cover default, statictoc and modern templates.

@vicancy vicancy changed the title Preserve REST schema structure with typed view models Add Swagger metadata compatibility tests and fix nullable overwrites Sep 24, 2026
@vicancy
vicancy merged commit 7fe76a7 into dotnet:main Sep 24, 2026
19 checks passed
@vicancy
vicancy deleted the codex/rest-view-models branch September 24, 2026 13:31
This was referenced Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant