Comments (2)
Things changed a little as was called out in #808 under API Version Model Extensions. I'm observing that a lot of people are not finding this during their migrations so I work on lifting some of that information out into a more formal migration guide.
The old API to new API mapping is:
GetApiVersionModel(ApiVersionMapping)
→GetApiVersionMetadata()
GetApiVersionModel()
→ApiVersionMetadata.Map(ApiVersionMapping.Explicit)
MappingTo(ApiVersion)
→ApiVersionMetadata.MappingTo(ApiVersion)
IsMappedTo(ApiVersion)
→ApiVersionMetadata.IsMappedTo(ApiVersion)
This enables the API to be common for the older ASP.NET Web API stack as well as the ASP.NET Core stack. Action descriptor properties are no longer used so that API Versioning can work for Minimal APIs, which doesn't support them.
GetApiVersionMetadata()
is generally the thing you are looking for and you shouldn't have to build your own extension methods to get the properties out. You can obviously create more refined extension methods, but they can build upon what is provided. If you really want to dive down into what these extension methods do, have a look at:
or
I hope that helps.
from aspnet-api-versioning.
Thanks a lot! I'll check this out. Yes some documentation on this in the wiki would definitely help
from aspnet-api-versioning.
Related Issues (20)
- Using ApiExplorerSettingsAttribute together with ApiVersionAttribute produces unexpected number of ApiVersionDescriptions HOT 5
- Asp.Net Core WebApi - AWS ECS Cluster Authentication failure HOT 2
- [Versioned Clients][API Notifications] Fails to read new versions when available HOT 2
- Swashbuckle documentation inconsistent with examples HOT 2
- AssumeDefaultVersionWhenUnspecified does not work correctly if ApiVersionNeutral is used in the controller HOT 2
- swagger.json file not found after update HOT 9
- My API is not displaying all the versions. HOT 4
- Improve docs for HeaderApiVersionReader
- Add synonym to `AddMvc` method. HOT 7
- CurrentImplementationApiVersionSelector behaves differently based on whether an operation still exists on latest API version HOT 3
- The error 'code' is not included in the error response when using AddErrorObjects() HOT 2
- .NET 8 ASP Versioning is allowing any version number to be passed in to api request and returns data. HOT 5
- Native AoT trim analysis warning : WithLinkGeneratorDecorator
- Using URL segment versioning breaks Swagger generation HOT 3
- Documentation: Default value for ApiVersionReader is misleading
- SBOM Report for Infor ( GRC Product )
- ApiVersionMatcherPolicy Invalidates valid candidates HOT 1
- Support Microsoft.AspNetCore.OData v9 HOT 3
- [Bug] Properties generated by DefaultModelTypeBuilder have invalid setter: without parameter
- Report in DefaultApiVersionReporter disposed RequestServices HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnet-api-versioning.