6.3.0 #919
Unanswered
commonsensesoftware
asked this question in
Q&A
6.3.0
#919
Replies: 1 comment 1 reply
-
Hi! I'm trying to use version 6 with .net 6 + Odata and see that examples do not match wiki (https://github.com/dotnet/aspnet-api-versioning/wiki/API-Versioning-with-OData). Is wiki correct? PArticular, IModelConfiguration in the wiki are hardcoded, while in the example they seem to be auto-discovered. I am using Swashbuckle as well. Also it's not clear from example - should I always list all the endpoints? https://github.com/dotnet/aspnet-api-versioning/blob/release/6.4/examples/AspNetCore/OData/SomeODataOpenApiExample/Program.cs#L38 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a minor update, which includes some routing improvements.
Features
All Platforms
ApiVersioningOptions.UnsupportedApiVersionStatusCode
has been added to indicate the status code used when an API version doesn't match400
, which has been the de facto from the beginning400
,404
, or501
are generally the ones that make senseProblemDetails
, which is always the same; regardless of status code404
Fixes
ASP.NET Core
IApiVersioningBuilder.AddMvc
andIApiVersioningBuilder.AddApiExplorer
now ensure dependent services are registeredAddApiExplorer
, in particular, snagged a number of people that didn't realize they neededAddMvc
ProblemDetails.Code
extension is now correctly written in JSON ascode
6.0
Breaking Changes
Restoring the unmatched endpoint behavior may break the expectations for those that have adopted
6.0
. There's no good answer or time for this change to occur since this is an implementation detail that only manifests in behavior. Despite calling out the changes in the roadmap and release notes, several issues have been filed related to the change in6.0
. At the time, it didn't seem possible to retain that functionality, but it seems that - largely - it can be.Ultimately, this change only affects APIs that are strictly concerned about whether the response will be
400
or404
for client errors on unmatched versions.400
will now revert to be the default case where you might have received404
. If it's important to you to retain the behaviors you've established while adopting6.x
, you can achieve that by setting:ASP.NET Web API
ASP.NET Core
This discussion was created from the release 6.3.0.
Beta Was this translation helpful? Give feedback.
All reactions