azure-functions-openapi-extension
azure-functions-openapi-extension copied to clipboard
Add support for customizing Swagger UI URL
Describe the issue
Currently, the URL of Swagger UI is hardcoded to swagger/ui (https://github.com/Azure/azure-functions-openapi-extension/blob/main/src/Microsoft.Azure.WebJobs.Extensions.OpenApi/OpenApiTriggerFunctionProvider.cs#L91).
Ideally, we should be able to customize the URL.
By default, after publishing the function, the swagger UI is available at: https://testaccount.azurewebsites.net/api/swagger/ui
we can remove the api prefix by adding the below lines to host.json:
"extensions": {
"http": {
"routePrefix": ""
}
},
but with the above lines, the URL will look like this: https://testaccount.azurewebsites.net/swagger/ui
Ideally, we should be able to serve Swagger UI from the root, that is: https://testaccount.azurewebsites.net
still actual