Azure / Azure/azure-functions-openapi-extension
Hide Swagger UI depending on settings value for isolated functions
- Dominant language
- C#
- Stars
- 388
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
**Issue:**
I want to be able to hide the Swagger UI page depending on what the settings file value is set to. For example, if I am in a Prod environment then I do not want to expose my Swagger UI site to the public. Then I just enable the true flag in the prod settings to hide the UI and return 404.
This feature option is currently available for "In-proc" model of Azure functions V4 but not for "Out-of-Proc"
To enable hiding the UI in a non-isolated model, all one has to do is set `"OpenApi__HideDocument" ` to `"true"` in the json settings file.
I was wondering if there is currently any workarounds or hacks that someone has implemented to make this work for out of process functions? Thanks in advanced.
Contributor guide
Research direction
Start by comparing how the existing OpenApi__HideDocument setting behaves for the in-process model with the isolated-functions path. Trace the isolated OpenAPI UI entry point and verify that enabling the setting prevents the UI from being exposed and returns 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, openapi
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100