Skip to content

Commit

Permalink
Merge branch 'master' into ft/randomness-option
Browse files Browse the repository at this point in the history
  • Loading branch information
twanthony4 authored May 10, 2024
2 parents 47f2e09 + 9115678 commit fd95d54
Show file tree
Hide file tree
Showing 26 changed files with 609 additions and 785 deletions.
2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle-core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle-core.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/customization/add-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SwaggerUI({
})
```

Or if you're updating the core plugins.. you'll add it to the base preset: [src/core/presets/base.js](https://github.com/swagger-api/swagger-ui/blob/master/src/core/presets/base.js)
Or if you're updating the core plugins.. you'll add it to the base preset: [src/core/presets/base/index.js](https://github.com/swagger-api/swagger-ui/blob/master/src/core/presets/base/index.js)

Each Plugin is a function that returns an object. That object will get merged with the `system` and later bound to the state.
Here is an example of each `type`
Expand Down
4 changes: 0 additions & 4 deletions docs/customization/plugin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,6 @@ const MyWrapComponentPlugin = function(system) {
}
```

**Note:**

If you have multiple plugins wrapping the same component, you may want to change the [`pluginsOptions.pluginLoadType`](/docs/usage/configuration.md#Plugins-options) parameter to `chain`.

#### `rootInjects`

The `rootInjects` interface allows you to inject values at the top level of the system.
Expand Down
7 changes: 4 additions & 3 deletions docs/development/setting-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ Swagger UI includes a development server that provides hot module reloading and

1. `git clone https://github.com/swagger-api/swagger-ui.git`
2. `cd swagger-ui`
3. `npm run dev`
4. Wait a bit
5. Open http://localhost:3200/
3. `npm install`
4. `npm run dev`
5. Wait a bit
6. Open http://localhost:3200/

### Using your own local api definition with local dev build

Expand Down
7 changes: 0 additions & 7 deletions docs/usage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,9 @@ Read more about the plugin system in the [Customization documentation](/docs/cus
Parameter name | Docker variable | Description
--- | --- | -----
<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.
<a name="pluginsOptions"></a>`pluginsOptions` | _Unavailable_ | `Object`. A Javascript object to configure plugin integration and behaviors (see below).
<a name="plugins"></a>`plugins` | _Unavailable_ | `Array=[]`. An array of plugin functions to use in Swagger UI.
<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.

##### Plugins options

Parameter name | Docker variable | Description
--- | --- | -----
<a name="pluginLoadType"></a>`pluginLoadType` | _Unavailable_ | `String=["legacy", "chain"]`. Control behavior of plugins when targeting the same component with wrapComponent.<br/>- `legacy` (default) : last plugin takes precedence over the others<br/>- `chain` : chain wrapComponents when targeting the same core component, allowing multiple plugins to wrap the same component

##### Display

<table role="table">
Expand Down
2 changes: 1 addition & 1 deletion flavors/swagger-ui-react/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const SwaggerUI = ({
system.specActions.updateSpec(updatedSpec)
}
}
}, [url, spec])
}, [system, url, spec])

return SwaggerUIComponent ? <SwaggerUIComponent /> : null
}
Expand Down
Loading

0 comments on commit fd95d54

Please sign in to comment.