Package io.quarkus.swaggerui.deployment
Class SwaggerUiConfig
java.lang.Object
io.quarkus.swaggerui.deployment.SwaggerUiConfig
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanIf this should be included every time.If set to true, enables deep linking for tags and operations.(package private) OptionalIntThe default expansion depth for the model on the model-example section.Controls how the model is shown when the API is first rendered.(package private) OptionalIntThe default expansion depth for models (set to -1 completely hide the models).Controls the display of operationId in operations list.Controls the display of the request duration (in milliseconds) for "Try it out" requests.(package private) Optional<io.smallrye.openapi.ui.DocExpansion>Controls the default expansion setting for the operations and tags.If set, enables filtering.A footer for the html page.The name of a component available via the plugin system to use as the top-level layout for Swagger UI.(package private) OptionalIntIf set, limits the number of tagged operations displayed to at most this many.Function to set default values to each property in model.OAuth redirect URL.OAuth additional query parameters added to authorizationUrl and tokenUrl - Used in the initOAuth method.OAuth application name, displayed in authorization popup - Used in the initOAuth method.OAuth default clientId - Used in the initOAuth method.OAuth default clientSecret - Used in the initOAuth method.OAuth1 Realm query parameter added to authorizationUrl and tokenUrl - Used in the initOAuth method.OAuth Scopes, separated using the oauthScopeSeparator - Used in the initOAuth method.OAuth scope separator for passing scopes - Used in the initOAuth method.OAuth only activated for the accessCode flow.OAuth only applies to authorization code flows.Provides a mechanism to be notified when Swagger UI has finished rendering a newly provided definition.Apply a sort to the operation list of each API.Function to set default value to parameters.The path where Swagger UI is available.If set to true, it persists authorization data and it would not be lost on browser close/refreshA list of plugin functions to use in Swagger UI.Pre-authorize ApiKey Auth, programmatically set ApiKeyValue for an API key or Bearer authorization scheme - Used in the preauthorizeApiKey method.Pre-authorize ApiKey Auth, programmatically set DefinitionKey for an API key or Bearer authorization scheme - Used in the preauthorizeApiKey method.Pre-authorize Basic Auth, programmatically set DefinitionKey for a Basic authorization scheme - Used in the preauthorizeBasic method.Pre-authorize Basic Auth, programmatically set Password for a Basic authorization scheme - Used in the preauthorizeBasic method.Pre-authorize Basic Auth, programmatically set Username for a Basic authorization scheme - Used in the preauthorizeBasic method.A list of presets to use in Swagger UI.(package private) booleanIf set to true, this allows the user to modify and test different query parameters in the API requestIf set, MUST be an array of command line options available to the curl command.MUST be a function.MUST be a function.Controls the display of extensions (pattern, maxLength, minLength, maximum, minimum) fields and values for Parameters.Controls the display of vendor extension (x-) fields and values for Operations, Parameters, and Schema.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.List of HTTP methods that have the "Try it out" feature enabled.Set tofalseto deactivate syntax highlighting of payloads and cURL command.Apply a sort to the tag list of each API.(package private) Optional<io.smallrye.openapi.ui.ThemeHref>Swagger UI theme to be used.The html title for the page.(package private) booleanIf try it out should be enabled by defaultThe urls that will be included as options.If urls option is used, this will be the name of the default selection.By default, Swagger UI attempts to validate specs against swagger.io's online validator.If set to true, enables passing credentials, as defined in the Fetch standard, in CORS requests that are sent by the browser. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
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 alwaysIncludeIf this should be included every time. By default, this is only included when the application is running in dev mode. -
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
If urls option is used, this will be the name of the default selection. -
title
The html title for the page. -
theme
Swagger UI theme to be used. -
deepLinking
If set to true, enables deep linking for tags and operations. -
displayOperationId
Controls the display of operationId in operations list. The default is false. -
defaultModelsExpandDepth
The default expansion depth for models (set to -1 completely hide the models). -
defaultModelExpandDepth
The default expansion depth for the model on the model-example section. -
defaultModelRendering
Controls how the model is shown when the API is first rendered. -
displayRequestDuration
Controls the display of the request duration (in milliseconds) for "Try it out" requests. -
docExpansion
Controls the default expansion setting for the operations and tags. -
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
If set, limits the number of tagged operations displayed to at most this many. The default is to show all operations. -
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
Controls the display of vendor extension (x-) fields and values for Operations, Parameters, and Schema. -
showCommonExtensions
Controls the display of extensions (pattern, maxLength, minLength, maximum, minimum) fields and values for Parameters. -
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
Provides a mechanism to be notified when Swagger UI has finished rendering a newly provided definition. -
syntaxHighlight
Set tofalseto deactivate syntax highlighting of payloads and cURL command. Can be otherwise an object with theactivateandthemeproperties. -
oauth2RedirectUrl
OAuth redirect URL. -
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
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
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
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
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
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
If set to true, enables passing credentials, as defined in the Fetch standard, in CORS requests that are sent by the browser. -
modelPropertyMacro
Function to set default values to each property in model. Accepts one argument modelPropertyMacro(property), property is immutable -
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
If set to true, it persists authorization data and it would not be lost on browser close/refresh -
layout
The name of a component available via the plugin system to use as the top-level layout for Swagger UI. -
plugins
A list of plugin functions to use in Swagger UI. -
presets
A list of presets to use in Swagger UI. -
oauthClientId
OAuth default clientId - Used in the initOAuth method. -
oauthClientSecret
OAuth default clientSecret - Used in the initOAuth method. -
oauthRealm
OAuth1 Realm query parameter added to authorizationUrl and tokenUrl - Used in the initOAuth method. -
oauthAppName
OAuth application name, displayed in authorization popup - Used in the initOAuth method. -
oauthScopeSeparator
OAuth scope separator for passing scopes - Used in the initOAuth method. -
oauthScopes
OAuth Scopes, separated using the oauthScopeSeparator - Used in the initOAuth method. -
oauthAdditionalQueryStringParams
OAuth additional query parameters added to authorizationUrl and tokenUrl - Used in the initOAuth method. -
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
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
Pre-authorize Basic Auth, programmatically set DefinitionKey for a Basic authorization scheme - Used in the preauthorizeBasic method. -
preauthorizeBasicUsername
Pre-authorize Basic Auth, programmatically set Username for a Basic authorization scheme - Used in the preauthorizeBasic method. -
preauthorizeBasicPassword
Pre-authorize Basic Auth, programmatically set Password for a Basic authorization scheme - Used in the preauthorizeBasic method. -
preauthorizeApiKeyAuthDefinitionKey
Pre-authorize ApiKey Auth, programmatically set DefinitionKey for an API key or Bearer authorization scheme - Used in the preauthorizeApiKey method. -
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 queryConfigEnabledIf set to true, this allows the user to modify and test different query parameters in the API request -
tryItOutEnabled
@ConfigItem(defaultValue="false") boolean tryItOutEnabledIf try it out should be enabled by default
-
-
Constructor Details
-
SwaggerUiConfig
public SwaggerUiConfig()
-