Skip to content

Update to Asp.Versioning to v10-preview2#980

Merged
mikekistler merged 2 commits intomainfrom
mdk/api-versioning-update
Apr 21, 2026
Merged

Update to Asp.Versioning to v10-preview2#980
mikekistler merged 2 commits intomainfrom
mdk/api-versioning-update

Conversation

@mikekistler
Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings April 19, 2026 19:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.2 and add Asp.Versioning.OpenApi.
  • Rework ServiceDefaults OpenAPI wiring to use AddApiExplorer(...).AddOpenApi(...) and MapOpenApi().WithDocumentPerVersion(), plus Scalar setup per version.
  • Enable ReportApiVersions in 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.

Comment thread src/eShop.ServiceDefaults/OpenApi.Extensions.cs
Comment thread src/eShop.ServiceDefaults/OpenApiOptionsExtensions.cs Outdated
Comment thread src/eShop.ServiceDefaults/OpenApiOptionsExtensions.cs Outdated
Comment thread src/Catalog.API/Catalog.API.http Outdated
halter73
halter73 approved these changes Apr 20, 2026
Comment thread src/eShop.ServiceDefaults/OpenApi.Extensions.cs
Comment thread src/eShop.ServiceDefaults/OpenApi.Extensions.cs
Comment thread src/eShop.ServiceDefaults/OpenApiOptionsExtensions.cs Outdated
Comment thread src/eShop.ServiceDefaults/OpenApiOptionsExtensions.cs Outdated
Comment thread src/eShop.ServiceDefaults/OpenApiOptionsExtensions.cs Outdated
Comment thread .spectral.yml
@mikekistler mikekistler merged commit 9b4f943 into main Apr 21, 2026
3 of 5 checks passed
@mikekistler mikekistler deleted the mdk/api-versioning-update branch April 21, 2026 14:28
kongebra added a commit to kongebra/eShop that referenced this pull request Apr 21, 2026
Update to Asp.Versioning to v10-preview2 (dotnet#980)
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.

3 participants