Azure / Azure/azure-functions-openapi-extension
Providing different versions of endpoints
- Dominant language
- C#
- Stars
- 388
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
Could 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
``` cs
[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?
Contributor guide
Assessment
This issue has not been assessed yet.