Giter Site home page Giter Site logo

Comments (2)

commonsensesoftware avatar commonsensesoftware commented on May 22, 2024

Succinctly, I'll say that out-of-the-box - no. Individual services (e.g. controllers) require that API versioning be explicit per controller. This is the only way to reliably ensure things map the right way. The only exception is the implicit matching for the default API version. This behavior, however, is primarily meant to support backward compatibly once you opt into API versioning. To keep things unambiguous, there can only be one use case that supports this behavior.

The underlying code does not explicitly reply on attributes or conventions. It's really looking for implementations of IApiVersionProvider. You can easily extend the built-in attributes or you can define your own attributes that implement this interface. The extensions and customizations topic describes how this can be done. You can also choose to inherit from ApiVersionsBaseAttribute and implement IApiVersionProvider. It may also be to achieve your goals using a custom IApiVersionSelector.

Hopefully, this helps and gets you on your way. Keep in mind that it's critical that when the library asks what versions a controller supports, this can be retrieved in an unambiguous way.

from aspnet-api-versioning.

Broodja avatar Broodja commented on May 22, 2024

Thanks for clarification! IApiVersionProvider should be an answer, even it's not as straightforward as I wish.

from aspnet-api-versioning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.