Open justinyoo opened 2 years ago
It might be useful to have a bit more granularity, say I only want to expose the specification files (/swagger.{extension}
and /openapi/{version}.{extension}
), but not the UI for example.
@Pikabanga To be clear, there have already been two options – OpenApi__HideSwaggerUI
and OpenApi__HideDocument
that are applicable on the function app levels.
This feature is only applicable for services in front of the function apps like API Management, Front Door, etc.
Curerntly, 4 UI-related endpoints are not exposed to the OpenAPI document:
/swagger/ui
/swagger.{extension}
/openapi/{version}.{extension}
/oauth2-redirect.html
There are cases that devs want to expose those endpoints through Azure APIM. In that case, they have to manually add them. To reduce this manual efforts, this feature would be useful:
OpenApi__ExposeUI
– its value will befalse
by default. If it's set totrue
, all four UI-related endpoints should be accessible through APIM.exposeui
– itsvalue will befalse
by default. If it's set totrue
, all four UI-related endpoints should be accessible through APIM. In addition to that, this querystring parameter should take precedense to the environment variable.Update: 2022-03-29
There have already been options –
OpenApi__HideSwaggerUI
andOpenApi__HideDocument
that are applicable on the function app levels. To avoid providing dev with misleading information, the environment variable names might be changed.