Skip to content

Commit 536b9f2

Browse files
committed
docs(configuration): add missing config options to documentation
Add the following options that were defined in defaults.js but missing from docs/usage/configuration.md: - components: plugin system object for component overrides - fn: plugin system object for function overrides - configs: internal configuration pass-through object - initialState: initial Redux store state - fileUploadMediaTypes: media type prefixes for file upload UI - uncaughtExceptionHandler: handler for uncaught exceptions Fixes #10745
1 parent 34d6186 commit 536b9f2

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

docs/usage/configuration.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,26 @@ Type notations are formatted like so:
2323

2424
Parameter name | Docker variable | Description
2525
--- | --- | -----
26+
<a name="configs"></a>`configs` | _Unavailable_ | `Object={}`. An object with additional configuration values. Used internally to pass configurations from external sources.
2627
<a name="configUrl"></a>`configUrl` | `CONFIG_URL` | `String`. URL to fetch external configuration document from.
2728
<a name="dom_id"></a>`dom_id` | `DOM_ID` |`String`, **REQUIRED** if `domNode` is not provided. The ID of a DOM element inside which `SwaggerUI` will put its user interface.
2829
<a name="domNode"></a>`domNode` | _Unavailable_ | `Element`, **REQUIRED** if `dom_id` is not provided. The HTML DOM element inside which `SwaggerUI` will put its user interface. Overrides `dom_id`.
2930
<a name="spec"></a>`spec` | `SPEC` | `Object={}`. A JavaScript object describing the OpenAPI definition. When used, the `url` parameter will not be parsed. This is useful for testing manually-generated definitions without hosting them.
3031
<a name="url"></a>`url` | `URL` | `String`. The URL pointing to API definition (normally `swagger.json` or `swagger.yaml`). Will be ignored if `urls` or `spec` is used.
3132
<a name="urls"></a>`urls` | `URLS` | `Array`. An array of API definition objects (`[{url: "<url1>", name: "<name1>"},{url: "<url2>", name: "<name2>"}]`) used by Topbar plugin. When used and Topbar plugin is enabled, the `url` parameter will not be parsed. Names and URLs must be unique among all items in this array, since they're used as identifiers.
3233
<a name="urls.primaryName"></a>`urls.primaryName` | `URLS_PRIMARY_NAME` | `String`. When using `urls`, you can use this subparameter. If 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`.
33-
<a name="queryConfigEnabled"></a>`queryConfigEnabled` | `QUERY_CONFIG_ENABLED` | `Boolean=false`. Enables overriding configuration parameters via URL search params.
34+
<a name="queryConfigEnabled"></a>`queryConfigEnabled` | `QUERY_CONFIG_ENABLED` | `Boolean=false`. Enables overriding configuration parameters via URL search params.
35+
<a name="uncaughtExceptionHandler"></a>`uncaughtExceptionHandler` | _Unavailable_ | `Function=null`. A function that handles uncaught exceptions in the application. Accepts the error as an argument.
3436

3537
##### Plugin system
3638

3739
Read more about the plugin system in the [Customization documentation](/docs/customization/overview.md).
3840

3941
Parameter name | Docker variable | Description
4042
--- | --- | -----
43+
<a name="components"></a>`components` | _Unavailable_ | `Object={}`. An object with component overrides. Component names are keys and their implementations are values.
44+
<a name="fn"></a>`fn` | _Unavailable_ | `Object={}`. An object with custom function overrides. Function names are keys and their implementations are values.
45+
<a name="initialState"></a>`initialState` | _Unavailable_ | `Object={}`. An object to set the initial state of the Redux store.
4146
<a name="layout"></a>`layout` | _Unavailable_ | `String="BaseLayout"`. The name of a component available via the plugin system to use as the top-level layout for Swagger UI.
4247
<a name="plugins"></a>`plugins` | _Unavailable_ | `Array=[]`. An array of plugin functions to use in Swagger UI.
4348
<a name="presets"></a>`presets` | _Unavailable_ | `Array=[SwaggerUI.presets.ApisPreset]`. An array of presets to use in Swagger UI. Usually, you'll want to include `ApisPreset` if you use this option.
@@ -114,6 +119,11 @@ Parameter name | Docker variable | Description
114119
'none' (expands nothing).
115120
</td>
116121
</tr>
122+
<tr>
123+
<td><a name="user-content-fileuploadmediatypes"></a><code>fileUploadMediaTypes</code></td>
124+
<td><em>Unavailable</em></td>
125+
<td><code>Array=["application/octet-stream", "image/", "audio/", "video/"]</code>. A list of media type prefixes that should trigger the file upload UI instead of the text editor when used in a request body.</td>
126+
</tr>
117127
<tr>
118128
<td><a name="user-content-filter"></a><code>filter</code></td>
119129
<td><code>FILTER</code></td>

0 commit comments

Comments
 (0)