Questions tagged [api-versioning]

189 questions
0
votes
1 answer

APIController checking for all supported versions without having to add APIVersion(s) attribute to the controller

We have an API controller class that lists all supported versions with ApiVersion attribute. Versioning format used is,…
0
votes
1 answer

Semver: Introduced new redirect in web app, do I need to increment the major version?

I am unsure when to increment patch, minor and major using semantic versioning. If I introduce a new redirect that is performed when a session (a user) is in a specific state, is this considered a incompatible API change which requires me to…
0
votes
2 answers

Swagger: I need versioning AND grouping

Swagger with .Net 5 REST API. I have an API with hundreds of methods that necessitates the use of grouping related APIs together. At the same time, I need to start work on a V2 version of my API. I have spent hours trying different approaches to…
Matthew
  • 171
  • 2
  • 10
0
votes
0 answers

Spring API Mapping produces with or condition

I am trying to version my APIs and the approach I am following is by allowing the Accept header. @GetMapping("/api/version", produces = ["application/vnd.app.v1+json"]) fun versionOne(): Map{ return mapOf("version" to…
0
votes
1 answer

How to Invalidate all the requests for Expired API versions in URI Path with response like 410:Gone in Java?

If I have a new version of API implemented using API versioning of the form /api/v3/example/resource, and I wish to Reject request of form /api/v1/**, /api/v2/** etc. for all the requests having this structure, how can i do that ??
0
votes
2 answers

How to inform clients that the returned representation of a HTTP resource is deprecated?

If I would have a resource on a certain URI, like https://api.example.com/things/my-things and so far this resource may be displayed on the following representations: application/xml application/xhtml+xml text/xml text/html How SHOULD the server…
0
votes
1 answer

Service Fabric Web API Versioning issue

I'm working on a service fabric project with multiple stateless services. When i try to add versioning as in the code below [Authorize] [ApiVersion("2.0")] [Route("api/v{version:apiVersion}/[controller]")] public class SessionController :…
0
votes
1 answer

Versioning service layer with inheritance

I have a .net core 3.1 api and I want to version my controllers and I think some structure for versioning on service layer like below public interface IVersionableObject { } public class GetDataV1 : IVersionableObject { } …
Yusuf Kayikci
  • 323
  • 4
  • 16
0
votes
1 answer

REST API versioning pattern guide

I am writing huge Rest API, to make it easily discoverable, i am making the pattern like this way. http://127.0.0.1:8000/membership/api/v1/make-a-payment But i notice poeple used to make the pattern like this way:…
user12551055
0
votes
2 answers

How to stop default api vesion showing up in swagger document with NSwag in .Net Core?

After getting Api versioning fixed with following in .net core services.AddApiVersioning(options => { options.AssumeDefaultVersionWhenUnspecified = true; options.DefaultApiVersion = new…
Anayag
  • 145
  • 1
  • 10
0
votes
1 answer

AspNetCore api Versioning MapToApiVersion not descovered but still able to hit the route

Please consider the following case. Because version 1.0 is not defined on the controller in a ApiVersionAttribute it is not discovered a not declare an API version. Just like i want because from this moment on i don't want to support this version…
0
votes
1 answer

Design Pattern for versioning data objects in PHP Rest API

I'm just thinking of API versioning data objects. Let's say you have an object car, which looks like this in version 1 (directory v1): class Car { protected $color; protected $brand; protected $price; protected $custom; // getters and…
G-Wak
  • 53
  • 3
  • 12
0
votes
1 answer

Enforce Different Nuget Package Version in the same Project .Net Core

I am working on API versioning on .Net Core 3.1. The issue is that we are consuming an external nuget package that will apply different versions on different API versions. For example, for API Version 1.0, I need to use V2.0 of this nuget package;…
superninja
  • 3,114
  • 7
  • 30
  • 63
0
votes
1 answer

How can I version multiple release branches supporting different depedency versions?

We have a library at my organization that depends on 4 different things: The librdkafka library The ext-rdkafka PHP extension PHP language The Laravel framework We want to support all currently supported version of them. Currently the last three…
Joe Santos
  • 28
  • 3
0
votes
0 answers

Spring REST multiple controller files per version

In our REST APIs, we want to use path-based versioning for REST endpoints. Let's say we have a /v1/students GET endpoint. We have a corresponding controller method like: @GetMapping("/v1/students") public List getStudents(){ return…
Alparslan
  • 13
  • 3