Class SwaggerUiConfig


  • @ConfigRoot
    public class SwaggerUiConfig
    extends Object
    • Field Detail

      • path

        @ConfigItem(defaultValue="swagger-ui")
        public 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

        @ConfigItem(defaultValue="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

        @ConfigItem
        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

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

        @ConfigItem
        Optional<String> title
        The html title for the page.
      • theme

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

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

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

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

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

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

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

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

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

        @ConfigItem
        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

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

        @ConfigItem
        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

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

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

        @ConfigItem
        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

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

        @ConfigItem
        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

        @ConfigItem
        Optional<String> oauth2RedirectUrl
        OAuth redirect URL.
      • requestInterceptor

        @ConfigItem
        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

        @ConfigItem
        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

        @ConfigItem
        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

        @ConfigItem
        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

        @ConfigItem
        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

        @ConfigItem
        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

        @ConfigItem
        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

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

        @ConfigItem
        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

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

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

        @ConfigItem
        Optional<List<String>> plugins
        A list of plugin functions to use in Swagger UI.
      • presets

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

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

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

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

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

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

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

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

        @ConfigItem
        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

        @ConfigItem
        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

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

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

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

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

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

        @ConfigItem(defaultValue="false")
        boolean queryConfigEnabled
        If set to true, this allows the user to modify and test different query parameters in the API request
    • Constructor Detail

      • SwaggerUiConfig

        public SwaggerUiConfig()