Questions tagged [api-versioning]
189 questions
5
votes
1 answer
Constraint Reference 'ApiVersion' counld not resolved to a type
Constraint Reference Exception
Hi,
I'm using .Net 6 Web API with versioning, my versioning works just fine in Swagger, but when I reference my API from MVC Framework (.NET 6), I'm getting an exception that says :
InvalidOperationException: The…

KingKali
- 51
- 1
- 3
5
votes
3 answers
.NET Core WebAPI fall-back API-version in case of missing minor version
After many tries and read articles I decided to place my issue here. What I want is the following: I am working on api-versioning of an application. A supported version format by .NET Core (Microsoft.AspNetCore.Mvc.Versioning package) is…

mirind4
- 1,423
- 4
- 21
- 29
5
votes
2 answers
Unsupported API version with versions within URI — what's wrong?
I have a Web API project using .net core 2.2 (maybe there's the problem.)
The routes are awaiting OAuth authorization with OpenIdDict, but that works totally fine for me. I am trying a very simple approach:
The startup.cs just…

iquellis
- 979
- 1
- 8
- 26
5
votes
2 answers
An API version is required, but was not specified. webapi
var constraintResolver = new DefaultInlineConstraintResolver()
{
ConstraintMap =
{
["apiVersion"] = typeof( ApiVersionRouteConstraint )
}
};
…

user3711357
- 1,425
- 7
- 32
- 54
5
votes
2 answers
DRF testing views with versioning: versioned url retrieval
I created some tests for my views before. Like that
class TestUserRegistrationViewUserCreate(APITestCase):
def setUp(self):
self.factory = APIRequestFactory()
def test_create_user(self):
data = {
'phone_number': '+79513332211',
…

mkurnikov
- 1,581
- 2
- 16
- 19
4
votes
1 answer
Are CUDA_VERSION and CUDART_VERSION necessarily the same?
The CUDA Driver API defines CUDA_VERSION (in cuda.h), and the CUDA Runtime API defines CUDART_VERSION (in cuda_runtime_api.h). However - CUDART_VERSION is not defined as CUDA_VERSION but directly as a number.
Are they always supposed to have the…

einpoklum
- 118,144
- 57
- 340
- 684
4
votes
1 answer
.Net Core 3.1 swagger API versioning conflicting namespaces url
I'm using swagger to generate my API documentation, and now i needed to version some of my endpoints.
So i configured swagger to identify my versions and map the endpoint correctly. But swagger is lossing its track because i used the same class…

MestreDosMagros
- 1,000
- 5
- 19
4
votes
1 answer
SpringBoot/Kotlin and Versioning through Content Negotiation: correct approach?
I have been experimenting with Content Negotiation as backend versioning for my SpringBoot/Kotlin application. I have the following:
@GetMapping("/user", produces = [MediaType.APPLICATION_JSON_VALUE])
fun getUsers() {
//some code…

panza
- 1,341
- 7
- 38
- 68
4
votes
2 answers
Grouping and Versioning not working well together in swagger in asp.net core 3.1 web api
I'm using Asp.Net Core 3.1 to build my API. I'm using swagger to generate document for my API. I decided to do grouping on my swagger document based on controller. So I ended up doing like this,
Startup - ConfigureServices:
options.SwaggerDoc(
…

fingers10
- 6,675
- 10
- 49
- 87
4
votes
2 answers
How to switch between RestControllers depending on HTTP header values?
We are considering using a header field to specify the REST API version in our spring boot application.
How can we tell spring boot to redirect calls depending on a header value?
I am dreaming about something like…

slartidan
- 20,403
- 15
- 83
- 131
4
votes
1 answer
What is the best way to do microservice REST API versioning?
I'm developing this project using Spring and hosting in AWS EC2 instances. As few new requirements coming up, I have to change my API contracts. But I don't want to break the current clients. So, I'm trying to implement some REST APIs with…

Ajanthan
- 198
- 2
- 10
4
votes
2 answers
XML Comments for route parameters
I am implementing a Web API project that will use the standard HelpPages area for documentation. I am using attribute routing and implemented ApiVersioning in my project. I've got most of my methods and models documented, however I am trying to…

Rockdocta
- 604
- 1
- 9
- 26
4
votes
1 answer
ASP.NET Core ApiVersioning change middleware hierarchy
I have a problem with middleware hierarchy. I created very simple web api with one controller/action
[Route("api/v1/values")]
public class ValuesController : Controller
{
// GET api/v1/values/5
[HttpGet("{id}")]
public async…

emilpytka
- 763
- 7
- 19
4
votes
1 answer
Right way to handle old versions of mobile app when your database schema has changed
i have an ionic android mobile app which connects to a ruby on rails api server
and this app uses postgresql as database server.
whenever i create a new feature i deploy both, the api and the new app to the app store and bump the respective versions…

Jagdish Adusumalli
- 509
- 5
- 9
4
votes
1 answer
AttributeRouting with IHttpControllerSelector - Api Versioning
I am trying to achieve api versioning using a CustomHttpControlSelector and AttributeRouting on asp.net webapi.
What i am trying to do is distinguish controller's versions by it's namespaces.
if a request is made to /api/v2/foo/bar
i want it to…

bahadir
- 709
- 1
- 11
- 28