Providing different versions of endpoints
See original GitHub issueCould you please provide any information on how I can handle versioning with your extension? Unfortunately, I haven’t found any examples or information about versioning in this repo.
Example: I have two version of one function
[Function("HttpTrigger_V1")]
public static HttpResponseData RunV1(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "v1/httpTrigger")]
HttpRequestData req,
FunctionContext executionContext)
{
var response = req.CreateResponse(HttpStatusCode.OK);
response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
response.WriteString("Welcome to Azure Functions! v1 ");
return response;
}
[Function("HttpTrigger_V2")]
public static HttpResponseData RunV2(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "v2/httpTrigger")]
HttpRequestData req,
FunctionContext executionContext)
{
var response = req.CreateResponse(HttpStatusCode.OK);
response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
response.WriteString("Welcome to Azure Functions! v2");
return response;
}
How can I document it in a proper way to see that this is exactly one function with different versions in swagger?
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Version REST APi as a whole, or by endpoint
A simple method to get most up-to-date versions without negotiation: The client requests the highest version it can handle, for example v3/fruit ...
Read more >API versioning for multiple endpoints released at different ...
I have a public facing REST API and SDK with multiple resources being managed: /api/v1/foo and /api/v1/bar. Both are currently version 1. I...
Read more >How to Version a REST API
URI path versioning implies orchestrated releases of application versions that will require one of two approaches: maintaining one version while ...
Read more >Managing Multiple Versions of Your API with .NET and ...
There are several different approaches to versioning REST APIs in .NET, including using the version number in the URL, using the Accept header, ......
Read more >Versioning an API | Cloud Endpoints with OpenAPI
Endpoints can run more than one major version of an API concurrently. By providing both versions of the API, your customers can pick...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@justinyoo thank you for your response. Unfortunately, this is not exactly what I want to achieve.
I’m looking for a way to create a dropdown with available versions in swagger UI.
+1 to this request. @justinyoo If we could configure multiple IOpenApiConfigurationOptions, that would be ideal. This is how tools like Swashbuckle handle multiple Swagger documents.