Skip to content

Commit a3f93c2

Browse files
committed
Merge branch 'master' of github.com:swagger-api/swagger-ui
* 'master' of github.com:swagger-api/swagger-ui: (37 commits) release: v3.25.4 chore(package): bump swagger-client to 3.10.4 version fix: entries as property name (swagger-api#6025) release: v3.25.3 housekeeping: update release-it config (swagger-api#6009) housekeeping: bump swagger-client version with package-lock (swagger-api#6008) housekeeping: update dev-e2e-cypress-open script name (swagger-api#6005) fix: jsonSchemaComponent file/files (swagger-api#5997) (swagger-api#6000) fix: curl array support within multipart/form-data (swagger-api#3838) (swagger-api#5999) release: v3.25.2 bug: remove clearValidation from onTryoutClick (swagger-api#5955) ft: JsonSchema components are now ImmutableJS compliant (swagger-api#5952) release: v3.25.1 housekeeping: revert @release-it/conventional-changelog version (swagger-api#5976) housekeeping: add missing conventional-changelog devDeps (swagger-api#5975) docs: update plugin api component for failSilently (swagger-api#5953) housekeeping: `npm audit fix` (swagger-api#5948) housekeeping: prevent log warning for missing getComponent in production fix(docker-image): send relative HTTP 301s from within container (swagger-api#5409) support for supportedSubmitMethods property in react component (swagger-api#5376) ...
2 parents fa71bca + c845498 commit a3f93c2

39 files changed

+3726
-952
lines changed

dist/swagger-ui-bundle.js

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-standalone-preset.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-standalone-preset.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker/nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ http {
2929
index index.html index.htm;
3030

3131
location / {
32+
absolute_redirect off;
3233
alias /usr/share/nginx/html/;
3334
expires 1d;
3435

docs/customization/plugin-api.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@ const NeverShowInfoPlugin = function(system) {
214214
}
215215
```
216216

217+
You can use `config.failSilently` if you don't want a warning when a component doesn't exist in the system.
218+
219+
Be mindful of `getComponent` arguments order. In the example below, the boolean `false` refers to presence of a container, and the 3rd argument is the config object used to suppress the missing component warning.
220+
```javascript
221+
const thisVariableWillBeNull = getComponent("not_real", false, { failSilently: true })
222+
```
223+
217224
#### Wrap-Actions
218225

219226
Wrap Actions allow you to override the behavior of an action in the system.

docs/development/setting-up.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,22 @@ Swagger UI includes a development server that provides hot module reloading and
44

55
### Prerequisites
66

7-
- Node.js `6.0.0` or greater
8-
- npm `3.0.0` or greater
97
- git, any version
8+
- NPM 6.x
109

10+
Generally, we recommend following guidelines from [Node.js Releases](https://nodejs.org/en/about/releases/) to only use Active LTS or Maintenance LTS releases.
11+
12+
Current Node.js Active LTS:
13+
- Node.js 12.x
14+
- NPM 6.x
15+
16+
Current Node.js Maintenance LTS:
17+
- Node.js 10.x
18+
- NPM 6.x
19+
20+
Unsupported Node.js LTS that should still work:
21+
- Node.js 8.13.0 or greater
22+
- NPM 6.x
1123

1224
### Steps
1325

docs/usage/installation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ This will serve Swagger UI at `/swagger` instead of `/`.
8383

8484
For more information on controlling Swagger UI through the Docker image, see the Docker section of the [Configuration documentation](configuration.md#docker).
8585

86-
### unpkg
86+
### unpkg
8787

8888
You can embed Swagger UI's code directly in your HTML by using unpkg's interface:
8989

@@ -93,3 +93,7 @@ You can embed Swagger UI's code directly in your HTML by using unpkg's interface
9393
```
9494

9595
See [unpkg's main page](https://unpkg.com/) for more information on how to use unpkg.
96+
97+
### Static files without HTTP or HTML
98+
99+
Once swagger-ui has successfully generated the `/dist` directory, you can copy this to your own file system and host from there.

flavors/swagger-ui-react/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ An array of objects that augment and modify Swagger UI's functionality. See Swag
8383

8484
⚠️ This prop is currently only applied once, on mount. Changes to this prop's value will not be propagated to the underlying Swagger UI instance. A future version of this module will remove this limitation, and the change will not be considered a breaking change.
8585

86+
#### `supportedSubmitMethods`: PropTypes.arrayOf(PropTypes.oneOf(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace']))
87+
88+
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.
89+
90+
⚠️ This prop is currently only applied once, on mount. Changes to this prop's value will not be propagated to the underlying Swagger UI instance. A future version of this module will remove this limitation, and the change will not be considered a breaking change.
91+
8692
## Limitations
8793

8894
* Not all configuration bindings are available.

flavors/swagger-ui-react/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default class SwaggerUI extends React.Component {
1818
responseInterceptor: this.responseInterceptor,
1919
onComplete: this.onComplete,
2020
docExpansion: this.props.docExpansion,
21+
supportedSubmitMethods: this.props.supportedSubmitMethods,
2122
defaultModelExpandDepth: this.props.defaultModelExpandDepth,
2223
})
2324

@@ -84,6 +85,9 @@ SwaggerUI.propTypes = {
8485
responseInterceptor: PropTypes.func,
8586
onComplete: PropTypes.func,
8687
docExpansion: PropTypes.oneOf(['list', 'full', 'none']),
88+
supportedSubmitMethods: PropTypes.arrayOf(
89+
PropTypes.oneOf(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])
90+
),
8791
defaultModelExpandDepth: PropTypes.number,
8892
plugins: PropTypes.arrayOf(PropTypes.object),
8993
}

0 commit comments

Comments
 (0)