azure-functions-openapi-extension icon indicating copy to clipboard operation
azure-functions-openapi-extension copied to clipboard

Add support for customizing Swagger UI URL

Open Misiu opened this issue 2 years ago • 1 comments

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

Misiu avatar Jan 02 '23 13:01 Misiu

still actual

Misiu avatar Nov 25 '24 09:11 Misiu