Skip to content

view

view serves a combined API documentation UI for Swagger definitions.

yaml
server:
  http:
    middlewares:
      docs_view:
        view:
          prefix_path: /view/
          info_url_type: yaml
          info:
            swagger_settings:
              base_path_prefix: /api
              disable_authorize_button: true
              schemes: [HTTPS]
            swagger:
              - name: petstore
                link: https://petstore.swagger.io/v2/swagger.json
FieldDescription
prefix_pathBase path for the UI.
info_urlOptional URL that returns the Swagger list.
info_url_typeyaml or json when info_url is used.
insecure_skip_verifySkip TLS verification while fetching info_url.
info.swaggerList of Swagger documents.
info.swagger_settingsDefaults applied to Swagger documents.

Use info_url when the list should come from another service; otherwise configure info inline.