Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

14 Comments

  1. I really like your articles. I recently jumped on the .Net Core 3. How would this versioning work with Swagger? Hooking swagger and trying to run results in an error page where swagger fails to understand the API. I see other people doing some plumbing work to get versioning and swagger work but that is not clean code at all.

  2. Can you elaborate on the benefits of doing this versus just implementing a version control system with a build/publish cycle in branching?

    1. Hi, isn’t this much easier and straight forward to implement compared to version controls. I am not very much aware of how you get all these benefits with version controls. This is quite easier to set up and much nicer on the organization part. We use this extensively at work, having the benefit to have multiple implementations for various clients and so on. It’s quite uncommon for me to hear about using gits for API versioning. Do let me know on what you think are the advantages.

      Thanks and regards.

  3. I tried this in .NET 5. It works well, but swagger failed. following error display “undefined /swagger/v1/swagger.json”.

  4. First, I really appreciate all the posts throughout the blog…they have all been great. Now, to my specific question:

    How do we combine the API versioning with something like the CQRS pattern via MediatR? I’m thinking specifically around something like the FluentPOS project where the Controllers for something like Brands can be versioned, but the bulk of the logic might be somewhere else?

    And maybe that’s where I’m thinking of this wrong. Where would you combine the versioning with the bulk of your business logic as that may change or should I even be thinking of it this way?

    Is versioning specific around how the entity might change (add field, change data type on field) and the business logic sits somewhere else that is independent of the API versioning? Not sure how separate those things can really be, but maybe they are.

  5. nice post…really helpful
    it works great on localhost, but when i deploy to server develop url mode the response is 404

  6. really enjoy your articles Mukesh.

    One question on versioning, should we also version our commands and queries if we are using CQRS?? In the event params change with the request. Have read a few articles and mostly they go through the versioning of controllers of the web api, not the versioning of other contracts etc.

    I would like to hear your thoughts on this and what is your strategy when versioning apis or even a small sample project to see it all in action.

    Cheers