Questions tagged [api-versioning]
189 questions
1
vote
0 answers
Adding aspnet-api-versioning prevents UrlHelper from generating Controller API routes within a Razor Pages request
I can create a file->new aspnetcore API project and use the IUrlHelper to generate a route by name without any issues.
[Route("api/[controller]")]
public class ValuesController : Controller
{
public const string GetValues = "GetValues";
…

Johnathon Sullinger
- 7,097
- 5
- 37
- 102
1
vote
3 answers
How to do versioning in ASP.NET Boilerplate Web API?
I am trying to do versioning in ASP.NET Boilerplate framework.
I have created two versions in Swagger Gen ("v1.0" and "v2.0") and set API version for Web API, but every time I get all API in both versions from Swagger.
Startup.cs:
AddSwaggerGen in…

Hardik Leuwa
- 3,282
- 3
- 14
- 28
1
vote
3 answers
Is it possible to include an underscore in an ApiVersion attribute on a controller?
I have inherited a legacy WebAPI system which currently uses underscores in the routing pattern to denote versions. For example /api/1_0/account, /api/1_1/account etc.
I am attempting to update the auto-generated documentation to use Swagger,…

Rory McCrossan
- 331,213
- 40
- 305
- 339
1
vote
1 answer
How can I populate the basepath of a swagger document when I have multiple versions of my API?
I am using Swashbuckle.AspNetCore to generate my swagger document, and I am using ApiVersion to version my controllers. My setup supports multiple versions, and this works fine. Meaning I can select a version in the Swagger UI, and I have a swagger…

pseudobjorn
- 65
- 5
1
vote
3 answers
Laravel 5.3 API Versioning
I am trying to get api versioning in place for an API I am working on, I found this post that explained how to do it using middleware and replacing a string in the route itself. Basically specifying routes like this.
Route::group(['middleware' =>…

Joseph Crawford
- 1,470
- 1
- 15
- 29
1
vote
1 answer
Cake - Setup routing to support versioned API controllers?
I want to be able to support multiple versioned endpoints from my api simultaneously, such as:
/api/v1.1/counties/get
/api/v1.2/counties/get
But in trying to implement the routing for this, a bit perplexed as to how Cake wants this as I keep…

meder omuraliev
- 183,342
- 71
- 393
- 434
1
vote
1 answer
ASP.NET WebApi versioning not working
I'm trying to implement api versioning following this tutorial. So in my startup I have:
var constraintResolver = new DefaultInlineConstraintResolver()
{
ConstraintMap =
{
["apiVersion"] = typeof( ApiVersionRouteConstraint )
…

krzyszt0fd
- 86
- 7
1
vote
1 answer
Facebook API version changes
I'm using Facebook API to create audience and upload data to created audience. But every time when Facebook changes API version, my web app show me logs that 'your ads API deprecated, change your API version'. And I know about these changes only…

Elvin Sadıqov
- 13
- 1
- 3
1
vote
2 answers
RESTful api versioning and grouping in doc from Swagger with multiple endpoints
I am trying to implement the version options on a MVC dotnet Core app that has API endpoint on it.
The set up i am after is like this
--AiM api
|_v1
|_v2
--RMS api
|_v1
I have it mostly working but the items on v1 are not showing up on…

Quantum
- 1,456
- 3
- 26
- 54
1
vote
1 answer
Versioning a PHP Lithium API
Goal
I've been tasked with versioning a pretty large PHP Lithium API.
The end result I'm looking for is to use namespacing to separate the versions.
For example, normally a lithium route that looked like…

Jamie Butler
- 235
- 1
- 2
- 19
1
vote
1 answer
Issue with Swagger Docs generated on api versioning support on a single controller
I have two Swagger docs generated by Swashbuckle, namely docs/v1 and docs/v2. However docs/v2 doesn't provide information on the action GetV2(). Please help if Swashbuckle has an option to address this.
1.Since the route template appears to be same…

Ramya5108
- 11
- 3
1
vote
2 answers
aspnet-api-versioning - backward compatibility
I need to сlarify.
I have .net mvc app and I use Microsoft/aspnet-api-versioning (for ASP.NET Core).
And I have 2 controllers:
[ApiVersion("1.0")]
[Route("[controller]")]
public class OneController : Controller
{
[HttpGet]
public string…

Puzirki
- 442
- 5
- 16
1
vote
1 answer
REST: Why version with headers using vnd and not adding new header for versioning?
In REST API, I was checking recommendation to version API with accept header as:
Accept: application/vnd.com.myservice.v2+json
Now, server can extract this information and send v2 response. Why are we sending vnd.com.myservice.v2 in accept header…

Sahil Sharma
- 3,847
- 6
- 48
- 98
1
vote
2 answers
How can I supply a path parameter to the displayed path in SwaggerUi?
I have setup Swagger/Swashbuckle on my WebAPI project. I have followed the guide from Microsoft which covers how to setup Aspnet.WebApi.Versioning with Swagger. My API has multiple versions, so there is a {version} parameter set in the route…

Rory McCrossan
- 331,213
- 40
- 305
- 339
1
vote
1 answer
How to implement REST API Versioning with nodejs + NGINX?
From past few days, I m working on How to implement API versioning with help of NGINX.
At an application level, I m able to implement But this required 2 Diff controller, 2 diff route, 2 diff model etc.. I don't want to do that.
I want two different…

Mahesh Gareja
- 1,652
- 2
- 12
- 23