Skip to content

New Feature: Expose UI endpoints to APIM by devs' choice #403

Open
@justinyoo

Description

@justinyoo

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:

  1. Add the environment variable OpenApi__ExposeUI – its value will be false by default. If it's set to true, all four UI-related endpoints should be accessible through APIM.
  2. Add the querystring parameter exposeui – itsvalue will be false by default. If it's set to true, 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 and OpenApi__HideDocument that are applicable on the function app levels. To avoid providing dev with misleading information, the environment variable names might be changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions