Package io.quarkus.swaggerui.deployment
Class SwaggerUiConfig
- java.lang.Object
-
- io.quarkus.swaggerui.deployment.SwaggerUiConfig
-
@ConfigRoot public class SwaggerUiConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanalwaysIncludeIf this should be included every time.(package private) Optional<Boolean>deepLinkingIf set to true, enables deep linking for tags and operations.(package private) OptionalIntdefaultModelExpandDepthThe default expansion depth for the model on the model-example section.(package private) Optional<String>defaultModelRenderingControls how the model is shown when the API is first rendered.(package private) OptionalIntdefaultModelsExpandDepthThe default expansion depth for models (set to -1 completely hide the models).(package private) Optional<Boolean>displayOperationIdControls the display of operationId in operations list.(package private) Optional<Boolean>displayRequestDurationControls the display of the request duration (in milliseconds) for "Try it out" requests.(package private) Optional<io.smallrye.openapi.ui.DocExpansion>docExpansionControls the default expansion setting for the operations and tags.(package private) Optional<String>filterIf set, enables filtering.(package private) Optional<String>footerA footer for the html page.(package private) Optional<String>layoutThe name of a component available via the plugin system to use as the top-level layout for Swagger UI.(package private) OptionalIntmaxDisplayedTagsIf set, limits the number of tagged operations displayed to at most this many.(package private) Optional<String>modelPropertyMacroFunction to set default values to each property in model.(package private) Optional<String>oauth2RedirectUrlOAuth redirect URL.(package private) Optional<String>oauthAdditionalQueryStringParamsOAuth additional query parameters added to authorizationUrl and tokenUrl - Used in the initOAuth method.(package private) Optional<String>oauthAppNameOAuth application name, displayed in authorization popup - Used in the initOAuth method.(package private) Optional<String>oauthClientIdOAuth default clientId - Used in the initOAuth method.(package private) Optional<String>oauthClientSecretOAuth default clientSecret - Used in the initOAuth method.(package private) Optional<String>oauthRealmOAuth1 Realm query parameter added to authorizationUrl and tokenUrl - Used in the initOAuth method.(package private) Optional<String>oauthScopesOAuth Scopes, separated using the oauthScopeSeparator - Used in the initOAuth method.(package private) Optional<String>oauthScopeSeparatorOAuth scope separator for passing scopes - Used in the initOAuth method.(package private) Optional<Boolean>oauthUseBasicAuthenticationWithAccessCodeGrantOAuth only activated for the accessCode flow.(package private) Optional<Boolean>oauthUsePkceWithAuthorizationCodeGrantOAuth only applies to authorization code flows.(package private) Optional<String>onCompleteProvides a mechanism to be notified when Swagger UI has finished rendering a newly provided definition.(package private) Optional<String>operationsSorterApply a sort to the operation list of each API.(package private) Optional<String>parameterMacroFunction to set default value to parameters.StringpathThe path where Swagger UI is available.(package private) Optional<Boolean>persistAuthorizationIf set to true, it persists authorization data and it would not be lost on browser close/refresh(package private) Optional<List<String>>pluginsA list of plugin functions to use in Swagger UI.(package private) Optional<String>preauthorizeApiKeyApiKeyValuePre-authorize ApiKey Auth, programmatically set ApiKeyValue for an API key or Bearer authorization scheme - Used in the preauthorizeApiKey method.(package private) Optional<String>preauthorizeApiKeyAuthDefinitionKeyPre-authorize ApiKey Auth, programmatically set DefinitionKey for an API key or Bearer authorization scheme - Used in the preauthorizeApiKey method.(package private) Optional<String>preauthorizeBasicAuthDefinitionKeyPre-authorize Basic Auth, programmatically set DefinitionKey for a Basic authorization scheme - Used in the preauthorizeBasic method.(package private) Optional<String>preauthorizeBasicPasswordPre-authorize Basic Auth, programmatically set Password for a Basic authorization scheme - Used in the preauthorizeBasic method.(package private) Optional<String>preauthorizeBasicUsernamePre-authorize Basic Auth, programmatically set Username for a Basic authorization scheme - Used in the preauthorizeBasic method.(package private) Optional<List<String>>presetsA list of presets to use in Swagger UI.(package private) booleanqueryConfigEnabledIf set to true, this allows the user to modify and test different query parameters in the API request(package private) Optional<List<String>>requestCurlOptionsIf set, MUST be an array of command line options available to the curl command.(package private) Optional<String>requestInterceptorMUST be a function.(package private) Optional<String>responseInterceptorMUST be a function.(package private) Optional<Boolean>showCommonExtensionsControls the display of extensions (pattern, maxLength, minLength, maximum, minimum) fields and values for Parameters.(package private) Optional<Boolean>showExtensionsControls the display of vendor extension (x-) fields and values for Operations, Parameters, and Schema.(package private) Optional<Boolean>showMutatedRequestIf 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.(package private) Optional<List<io.smallrye.openapi.ui.HttpMethod>>supportedSubmitMethodsList of HTTP methods that have the "Try it out" feature enabled.(package private) Optional<String>syntaxHighlightSet tofalseto deactivate syntax highlighting of payloads and cURL command.(package private) Optional<String>tagsSorterApply a sort to the tag list of each API.(package private) Optional<io.smallrye.openapi.ui.ThemeHref>themeSwagger UI theme to be used.(package private) Optional<String>titleThe html title for the page.(package private) Map<String,String>urlsThe urls that will be included as options.(package private) Optional<String>urlsPrimaryNameIf urls option is used, this will be the name of the default selection.(package private) Optional<String>validatorUrlBy default, Swagger UI attempts to validate specs against swagger.io's online validator.(package private) Optional<Boolean>withCredentialsIf set to true, enables passing credentials, as defined in the Fetch standard, in CORS requests that are sent by the browser.
-
Constructor Summary
Constructors Constructor Description SwaggerUiConfig()
-
-
-
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.
-
theme
@ConfigItem Optional<io.smallrye.openapi.ui.ThemeHref> theme
Swagger UI theme to be used.
-
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 tofalseto deactivate syntax highlighting of payloads and cURL command. Can be otherwise an object with theactivateandthemeproperties.
-
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.
-
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
-
-