Update to Asp.Versioning to v10-preview2#980
Merged
mikekistler merged 2 commits intomainfrom Apr 21, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the solution’s API versioning/OpenAPI integration to Asp.Versioning 10.0.0-preview.2, aligning the service defaults and API projects with the newer “per-version document” OpenAPI model.
Changes:
- Bump Asp.Versioning packages to
10.0.0-preview.2and addAsp.Versioning.OpenApi. - Rework ServiceDefaults OpenAPI wiring to use
AddApiExplorer(...).AddOpenApi(...)andMapOpenApi().WithDocumentPerVersion(), plus Scalar setup per version. - Enable
ReportApiVersionsin API projects and update the Catalog HTTP scratch file accordingly.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/eShop.ServiceDefaults/eShop.ServiceDefaults.csproj | Adds Asp.Versioning.OpenApi dependency needed for the new OpenAPI integration. |
| Directory.Packages.props | Central package bump to Asp.Versioning 10.0.0-preview.2 and adds package version for Asp.Versioning.OpenApi. |
| src/eShop.ServiceDefaults/OpenApi.Extensions.cs | Switches to per-version OpenAPI mapping and new AddOpenApi configuration pipeline; updates Scalar document listing/redirect. |
| src/eShop.ServiceDefaults/OpenApiOptionsExtensions.cs | Adjusts OpenAPI transformers for deprecated operations and api-version parameter defaults/examples. |
| src/Catalog.API/Program.cs | Enables API version reporting headers via ReportApiVersions = true. |
| src/Ordering.API/Program.cs | Enables API version reporting headers via ReportApiVersions = true. |
| src/Webhooks.API/Program.cs | Enables API version reporting headers via ReportApiVersions = true. |
| src/Catalog.API/Catalog.API.http | Updates sample requests for OpenAPI endpoints and API version query usage. |
| .spectral.yml | Disables the oas3-api-servers rule. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kongebra
added a commit
to kongebra/eShop
that referenced
this pull request
Apr 21, 2026
Update to Asp.Versioning to v10-preview2 (dotnet#980)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the Asp.Versioning package to 10.0.0-preview.2, which provides a cleaner and simpler versioning configuration for .NET 10 projects.