You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: docs/usage/configuration.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,21 +23,26 @@ Type notations are formatted like so:
23
23
24
24
Parameter name | Docker variable | Description
25
25
--- | --- | -----
26
+
<aname="configs"></a>`configs` | _Unavailable_ | `Object={}`. An object with additional configuration values. Used internally to pass configurations from external sources.
<aname="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.
28
29
<aname="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`.
29
30
<aname="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.
30
31
<aname="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.
31
32
<aname="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.
32
33
<aname="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`.
<aname="uncaughtExceptionHandler"></a>`uncaughtExceptionHandler` | _Unavailable_ | `Function=null`. A function that handles uncaught exceptions in the application. Accepts the error as an argument.
34
36
35
37
##### Plugin system
36
38
37
39
Read more about the plugin system in the [Customization documentation](/docs/customization/overview.md).
38
40
39
41
Parameter name | Docker variable | Description
40
42
--- | --- | -----
43
+
<aname="components"></a>`components` | _Unavailable_ | `Object={}`. An object with component overrides. Component names are keys and their implementations are values.
44
+
<aname="fn"></a>`fn` | _Unavailable_ | `Object={}`. An object with custom function overrides. Function names are keys and their implementations are values.
45
+
<aname="initialState"></a>`initialState` | _Unavailable_ | `Object={}`. An object to set the initial state of the Redux store.
41
46
<aname="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.
42
47
<aname="plugins"></a>`plugins` | _Unavailable_ | `Array=[]`. An array of plugin functions to use in Swagger UI.
43
48
<aname="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.
<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>
0 commit comments