Optional
deeptrue
Optional
defaultThe default expansion depth for the model on the model-example section.
1
Optional
defaultControls how the model is shown when the API is first rendered. The user can always switch the rendering for a given model by clicking the 'Model' and 'Example Value' links.
example
Optional
defaultThe default expansion depth for models (set to -1 completely hide the models).
1
Optional
displayControls the display of operationId in operations list.
false.
Optional
displayControls the display of the request duration (in milliseconds) for "Try it out" requests.
false
Optional
docControls the default expansion setting for the operations and tags. It can be 'list' (expands only the tags), 'full' (expands the tags and operations) or 'none' (expands nothing).
list
Optional
filterIf 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.
Optional
layoutThe name of a component available via the plugin system to use as the top-level layout for Swagger UI.
StandaloneLayout
Optional
maxIf set, limits the number of tagged operations displayed to at most this many. The default is to show all operations.
Optional
primaryIf the value matches the name of a spec provided in urls, that spec will be displayed when Swagger UI loads, instead of defaulting to the first spec in urls.
Optional
queryEnables overriding configuration parameters via URL search params.
false
Optional
requestThis is the default configuration section for the requestSnippets plugin.
Optional
generators?: { Generators for different shell syntax.
Optional
curl_cURL command for Bash shell
Optional
curl_cURL command for CMD shell
Optional
curl_cURL command for PowerShell shell
Optional
defaultTrue if the list of languages should be expanded by default.
Optional
languages?: null | ["curl_bash"]An array to only show certain syntax. Set to ["curl_bash"] to only show curl bash.
Optional
persistIf set to true, it persists authorization data, and it would not be lost on browser close/refresh
false
Optional
showIf 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.
true
Optional
supportedList 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.
Array=["get", "put", "post", "delete", "options", "head", "patch", "trace"]
Optional
validatorBy 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.
https://validator.swagger.io/validator
Optional
withIf set to true, enables passing credentials, as defined in the Fetch standard, in CORS requests that are sent by the browser. Note that Swagger UI cannot currently set cookies cross-domain (see swagger-js#1163) - as a result, you will have to rely on browser-supplied cookies (which this setting enables sending) that Swagger UI cannot control.
Optional
requestEnables the request snippet section. When disabled, the legacy curl snippet will be used.
false
Optional
showControls the display of extensions (pattern, maxLength, minLength, maximum, minimum) fields and values for Parameters.
false
Optional
showControls the display of vendor extensions (x-) fields and values for Operations, Parameters, Responses, and Schema.
true
Optional
syntaxSet to false to deactivate syntax highlighting of payloads and cURL command, can be otherwise an object with the activate and theme properties.
Optional
activate?: booleanBoolean=true. Whether syntax highlighting should be activated or not.
Optional
theme?: "agate" | "arta" | "monokai" | "nord" | "obsidian" | "tomorrow-night" | "idea"Highlight.js syntax coloring theme to use. (Only these 7 styles are available.)
false
Optional
tryControls whether the "Try it out" section should be enabled by default.
false
If set to true, enables deep linking for tags and operations. See the Deep Linking documentation for more information.