Questions tagged [api-versioning]
189 questions
129
votes
4 answers
How do you manage the underlying codebase for a versioned API?
I've been reading up on versioning strategies for ReST APIs, and something none of them appear to address is how you manage the underlying codebase.
Let's say we're making a bunch of breaking changes to an API - for example, changing our Customer…

Dylan Beattie
- 53,688
- 35
- 128
- 197
44
votes
15 answers
ASP.NET CORE, Web API: No route matches the supplied values
PLEASE NOTE: This question was asked in 2016. The original answer to this problem was to update the microsoft api versiong package. In the current days, the problem reoccurs, but for other reasons.
Original Question:
i have some problems with the…

Benjamin Schäublin
- 1,526
- 1
- 16
- 26
27
votes
2 answers
The inline constraint resolver of type 'DefaultInlineConstraintResolver' was unable to resolve the following inline constraint: 'apiVersion'
I have a basic WebApi implementation setup with the default Values controller.
After reading a blog about RESTful WebApi Versioning I decided to integrate the package into a new WebApi project.
I've added the NuGet package…

Zoop
- 872
- 3
- 11
- 24
20
votes
5 answers
REST API: Multiple versions, single application?
I am working on a REST API where I will have to introduce some breaking changes soon, so a v2 is needed. We still need to support v1 for a couple of months though in parallel, to give our clients time to switch over to the new API whenever they are…

user3237736
- 845
- 1
- 9
- 24
17
votes
1 answer
VersionedRoute Attribute Implementation for MVC6
I am trying to enable versioning on a REST API, where the version is specified in the header, as "api-version":2.
According to this tutorial I just need to create
VersionConstraint : IHttpRouteConstraint
and
VersionedRoute:…

bilo-io
- 597
- 3
- 17
16
votes
1 answer
Laravel API versioning folders structure
I am new in api versioning ,so my question is :
1)Is this folder structure true?
/app
/controllers
/Api
/v1
/UserController.php
/v2
/UserController.php
for routes :
Route::group(['prefix' => 'v1'], function () {
…

parastoo
- 2,211
- 2
- 21
- 38
13
votes
6 answers
Using separate directory for each version of the API
I'm planning to create an API with Laravel framework. And there may be multiple versions of the API if I continue developing it, like: v1, v2, v3, and so on.
And instead of having only one copy of Laravel framework and versioning the API inside it…

Amr
- 4,809
- 6
- 46
- 60
10
votes
2 answers
NSwag .NET Core API Versioning configuration
I'd like to prepare my .NET Core Web API project so that multiple versions of the API can be managed and documented, according to the REST services standards.
I'm using .NET Core 2.1 with NSwag (v11.18.2). I also installed the…

Cheshire Cat
- 1,941
- 6
- 36
- 69
9
votes
1 answer
How does Raku decide which version of a module gets loaded?
When I do use Foo:ver<1.0>; it loads version 1.0 of module Foo. But what happens when I do use Foo;?

ugexe
- 5,297
- 1
- 28
- 49
8
votes
2 answers
Conflicting method/path combination for action - Swagger unable to distinguish alternate version from Route
I have the following controller setup in my solution:
[Route("api/v{VersionId}/[controller]")]
[ApiController]
[Produces("application/json")]
[Consumes("application/json")]
public class MyBaseController :…

jezzipin
- 4,110
- 14
- 50
- 94
8
votes
2 answers
Options to organize my project with: JAX-RS API, ServiceLocator and Remote EJBs
I'm trying to figure out the options that I have for the architecture of my API project.
I would like to create an API using JAX-RS version 1.0. This API consumes Remote EJBs (EJB 3.0) from a bigger, old and complex application. I'm using Java 6.
So…

Dherik
- 17,757
- 11
- 115
- 164
7
votes
2 answers
How to set FastAPI version to allow HTTP specifying version in accept header?
I am working on a project that requires to version FastAPI endpoints. We want to version the endpoint through HTTP accept header, for example:
headers={'Accept': 'application/json;version=1.0.1'},
headers={'Accept':…

Sue-May Xu
- 460
- 2
- 9
- 16
7
votes
2 answers
Customized error responses for ApiVersioning errors in webapi dotnet core
I am creating a package lib for all the errors in a Webapi service. This library will be used for providing custom responses for BadRequest, BadArgument, ApiVersionsing etc.. related errors. I need help in customizing Apiversion related errors for -…

arpymastro
- 751
- 3
- 16
- 34
6
votes
1 answer
ASP.NET Core API Versioning - Same controller for all versions
I have an ASP.NET Core 3.1 API and I am introducing a new version for one of my controllers.
I am using the Microsoft.AspNetCore.Mvc.Versioning NuGet package and I have set the new version to be the default version.
All my other controllers should…

Ronzan
- 118
- 1
- 7
6
votes
2 answers
Multiple Api Versions with Swagger in MVC 6 when using action constraints
Hopefully somebody has tried something similar with a versioned API in MVC 6 and Swagger to display documentation about the different versions.
I am using the recommended API versioning in MVC 6 as per this ASP.NET 5 repository. The only change I…

diegosasw
- 13,734
- 16
- 95
- 159