Interface SwaggerUiConfig


@ConfigRoot @ConfigMapping(prefix="quarkus.swagger-ui") public interface SwaggerUiConfig
  • Method Details

    • path

      @WithDefault("swagger-ui") String path()
      The path where Swagger UI is available.

      The value `/` is not allowed as it blocks the application from serving anything else. By default, this value will be resolved as a path relative to `${quarkus.http.non-application-root-path}`.

    • alwaysInclude

      @WithDefault("false") boolean alwaysInclude()
      If this should be included every time. By default, this is only included when the application is running in dev mode.
    • urls

      @ConfigDocMapKey("name") Map<String,String> urls()
      The urls that will be included as options. By default, the OpenAPI path will be used. Here you can override that and supply multiple urls that will appear in the TopBar plugin.
    • urlsPrimaryName

      Optional<String> urlsPrimaryName()
      If urls option is used, this will be the name of the default selection.
    • title

      Optional<String> title()
      The html title for the page.
    • theme

      Optional<io.smallrye.openapi.ui.ThemeHref> theme()
      Swagger UI theme to be used.
    • footer

      Optional<String> footer()
      A footer for the html page. Nothing by default.
    • deepLinking

      Optional<Boolean> deepLinking()
      If set to true, enables deep linking for tags and operations.
    • displayOperationId

      Optional<Boolean> displayOperationId()
      Controls the display of operationId in operations list. The default is false.
    • defaultModelsExpandDepth

      OptionalInt defaultModelsExpandDepth()
      The default expansion depth for models (set to -1 completely hide the models).
    • defaultModelExpandDepth

      OptionalInt defaultModelExpandDepth()
      The default expansion depth for the model on the model-example section.
    • defaultModelRendering

      Optional<String> defaultModelRendering()
      Controls how the model is shown when the API is first rendered.
    • displayRequestDuration

      Optional<Boolean> displayRequestDuration()
      Controls the display of the request duration (in milliseconds) for "Try it out" requests.
    • docExpansion

      Optional<io.smallrye.openapi.ui.DocExpansion> docExpansion()
      Controls the default expansion setting for the operations and tags.
    • filter

      Optional<String> filter()
      If set, enables filtering. The top bar will show an edit box that you can use to filter the tagged operations that are shown. Can be Boolean to enable or disable, or a string, in which case filtering will be enabled using that string as the filter expression. Filtering is case-sensitive matching the filter expression anywhere inside the tag.
    • maxDisplayedTags

      OptionalInt maxDisplayedTags()
      If set, limits the number of tagged operations displayed to at most this many. The default is to show all operations.
    • operationsSorter

      Optional<String> operationsSorter()
      Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged.
    • showExtensions

      Optional<Boolean> showExtensions()
      Controls the display of vendor extension (x-) fields and values for Operations, Parameters, and Schema.
    • showCommonExtensions

      Optional<Boolean> showCommonExtensions()
      Controls the display of extensions (pattern, maxLength, minLength, maximum, minimum) fields and values for Parameters.
    • tagsSorter

      Optional<String> tagsSorter()
      Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see Array.prototype.sort() to learn how to write a sort function). Two tag name strings are passed to the sorter for each pass. Default is the order determined by Swagger UI.
    • onComplete

      Optional<String> onComplete()
      Provides a mechanism to be notified when Swagger UI has finished rendering a newly provided definition.
    • syntaxHighlight

      Optional<String> syntaxHighlight()
      Set to false to deactivate syntax highlighting of payloads and cURL command. Can be otherwise an object with the activate and theme properties.
    • oauth2RedirectUrl

      Optional<String> oauth2RedirectUrl()
      OAuth redirect URL.
    • requestInterceptor

      Optional<String> requestInterceptor()
      MUST be a function. Function to intercept remote definition, "Try it out", and OAuth 2.0 requests. Accepts one argument requestInterceptor(request) and must return the modified request, or a Promise that resolves to the modified request.
    • requestCurlOptions

      Optional<List<String>> requestCurlOptions()
      If set, MUST be an array of command line options available to the curl command. This can be set on the mutated request in the requestInterceptor function.
    • responseInterceptor

      Optional<String> responseInterceptor()
      MUST be a function. Function to intercept remote definition, "Try it out", and OAuth 2.0 responses. Accepts one argument responseInterceptor(response) and must return the modified response, or a Promise that resolves to the modified response.
    • showMutatedRequest

      Optional<Boolean> showMutatedRequest()
      If set to true, uses the mutated request returned from a requestInterceptor to produce the curl command in the UI, otherwise the request before the requestInterceptor was applied is used.
    • supportedSubmitMethods

      Optional<List<io.smallrye.openapi.ui.HttpMethod>> supportedSubmitMethods()
      List of HTTP methods that have the "Try it out" feature enabled. An empty array disables "Try it out" for all operations. This does not filter the operations from the display.
    • validatorUrl

      Optional<String> validatorUrl()
      By default, Swagger UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators (Validator Badge). Setting it to either none, 127.0.0.1 or localhost will disable validation.
    • withCredentials

      Optional<Boolean> withCredentials()
      If set to true, enables passing credentials, as defined in the Fetch standard, in CORS requests that are sent by the browser.
    • modelPropertyMacro

      Optional<String> modelPropertyMacro()
      Function to set default values to each property in model. Accepts one argument modelPropertyMacro(property), property is immutable
    • parameterMacro

      Optional<String> parameterMacro()
      Function to set default value to parameters. Accepts two arguments parameterMacro(operation, parameter). Operation and parameter are objects passed for context, both remain immutable
    • persistAuthorization

      Optional<Boolean> persistAuthorization()
      If set to true, it persists authorization data and it would not be lost on browser close/refresh
    • layout

      Optional<String> layout()
      The name of a component available via the plugin system to use as the top-level layout for Swagger UI.
    • plugins

      Optional<List<String>> plugins()
      A list of plugin functions to use in Swagger UI.
    • scripts

      Optional<List<String>> scripts()
      A list of external scripts (usually plugins) to use in Swagger UI.
    • presets

      Optional<List<String>> presets()
      A list of presets to use in Swagger UI.
    • oauthClientId

      Optional<String> oauthClientId()
      OAuth default clientId - Used in the initOAuth method.
    • oauthClientSecret

      Optional<String> oauthClientSecret()
      OAuth default clientSecret - Used in the initOAuth method.
    • oauthRealm

      Optional<String> oauthRealm()
      OAuth1 Realm query parameter added to authorizationUrl and tokenUrl - Used in the initOAuth method.
    • oauthAppName

      Optional<String> oauthAppName()
      OAuth application name, displayed in authorization popup - Used in the initOAuth method.
    • oauthScopeSeparator

      Optional<String> oauthScopeSeparator()
      OAuth scope separator for passing scopes - Used in the initOAuth method.
    • oauthScopes

      Optional<String> oauthScopes()
      OAuth Scopes, separated using the oauthScopeSeparator - Used in the initOAuth method.
    • oauthAdditionalQueryStringParams

      Optional<String> oauthAdditionalQueryStringParams()
      OAuth additional query parameters added to authorizationUrl and tokenUrl - Used in the initOAuth method.
    • oauthUseBasicAuthenticationWithAccessCodeGrant

      Optional<Boolean> oauthUseBasicAuthenticationWithAccessCodeGrant()
      OAuth only activated for the accessCode flow. During the authorization_code request to the tokenUrl, pass the Client Password using the HTTP Basic Authentication scheme - Used in the initOAuth method.
    • oauthUsePkceWithAuthorizationCodeGrant

      Optional<Boolean> oauthUsePkceWithAuthorizationCodeGrant()
      OAuth only applies to authorization code flows. Proof Key for Code Exchange brings enhanced security for OAuth public clients - Used in the initOAuth method.
    • preauthorizeBasicAuthDefinitionKey

      Optional<String> preauthorizeBasicAuthDefinitionKey()
      Pre-authorize Basic Auth, programmatically set DefinitionKey for a Basic authorization scheme - Used in the preauthorizeBasic method.
    • preauthorizeBasicUsername

      Optional<String> preauthorizeBasicUsername()
      Pre-authorize Basic Auth, programmatically set Username for a Basic authorization scheme - Used in the preauthorizeBasic method.
    • preauthorizeBasicPassword

      Optional<String> preauthorizeBasicPassword()
      Pre-authorize Basic Auth, programmatically set Password for a Basic authorization scheme - Used in the preauthorizeBasic method.
    • preauthorizeApiKeyAuthDefinitionKey

      Optional<String> preauthorizeApiKeyAuthDefinitionKey()
      Pre-authorize ApiKey Auth, programmatically set DefinitionKey for an API key or Bearer authorization scheme - Used in the preauthorizeApiKey method.
    • preauthorizeApiKeyApiKeyValue

      Optional<String> preauthorizeApiKeyApiKeyValue()
      Pre-authorize ApiKey Auth, programmatically set ApiKeyValue for an API key or Bearer authorization scheme - Used in the preauthorizeApiKey method.
    • queryConfigEnabled

      @WithDefault("false") boolean queryConfigEnabled()
      If set to true, this allows the user to modify and test different query parameters in the API request
    • tryItOutEnabled

      @WithDefault("false") boolean tryItOutEnabled()
      If try it out should be enabled by default