Skip to content

Commit

Permalink
Merge branch 'master' of github.com:swagger-api/swagger-ui
Browse files Browse the repository at this point in the history
* '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)
  ...
  • Loading branch information
Pentusha committed May 27, 2020
2 parents fa71bca + c845498 commit a3f93c2
Show file tree
Hide file tree
Showing 39 changed files with 3,726 additions and 952 deletions.
26 changes: 13 additions & 13 deletions dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions 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.

1 change: 1 addition & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ http {
index index.html index.htm;

location / {
absolute_redirect off;
alias /usr/share/nginx/html/;
expires 1d;

Expand Down
7 changes: 7 additions & 0 deletions docs/customization/plugin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ const NeverShowInfoPlugin = function(system) {
}
```

You can use `config.failSilently` if you don't want a warning when a component doesn't exist in the system.

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.
```javascript
const thisVariableWillBeNull = getComponent("not_real", false, { failSilently: true })
```

#### Wrap-Actions

Wrap Actions allow you to override the behavior of an action in the system.
Expand Down
16 changes: 14 additions & 2 deletions docs/development/setting-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ Swagger UI includes a development server that provides hot module reloading and

### Prerequisites

- Node.js `6.0.0` or greater
- npm `3.0.0` or greater
- git, any version
- NPM 6.x

Generally, we recommend following guidelines from [Node.js Releases](https://nodejs.org/en/about/releases/) to only use Active LTS or Maintenance LTS releases.

Current Node.js Active LTS:
- Node.js 12.x
- NPM 6.x

Current Node.js Maintenance LTS:
- Node.js 10.x
- NPM 6.x

Unsupported Node.js LTS that should still work:
- Node.js 8.13.0 or greater
- NPM 6.x

### Steps

Expand Down
6 changes: 5 additions & 1 deletion docs/usage/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This will serve Swagger UI at `/swagger` instead of `/`.

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

### unpkg
### unpkg

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

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

See [unpkg's main page](https://unpkg.com/) for more information on how to use unpkg.

### Static files without HTTP or HTML

Once swagger-ui has successfully generated the `/dist` directory, you can copy this to your own file system and host from there.
6 changes: 6 additions & 0 deletions flavors/swagger-ui-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ An array of objects that augment and modify Swagger UI's functionality. See Swag

⚠️ 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.

#### `supportedSubmitMethods`: PropTypes.arrayOf(PropTypes.oneOf(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace']))

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.

⚠️ 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.

## Limitations

* Not all configuration bindings are available.
Expand Down
4 changes: 4 additions & 0 deletions flavors/swagger-ui-react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default class SwaggerUI extends React.Component {
responseInterceptor: this.responseInterceptor,
onComplete: this.onComplete,
docExpansion: this.props.docExpansion,
supportedSubmitMethods: this.props.supportedSubmitMethods,
defaultModelExpandDepth: this.props.defaultModelExpandDepth,
})

Expand Down Expand Up @@ -84,6 +85,9 @@ SwaggerUI.propTypes = {
responseInterceptor: PropTypes.func,
onComplete: PropTypes.func,
docExpansion: PropTypes.oneOf(['list', 'full', 'none']),
supportedSubmitMethods: PropTypes.arrayOf(
PropTypes.oneOf(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])
),
defaultModelExpandDepth: PropTypes.number,
plugins: PropTypes.arrayOf(PropTypes.object),
}
Loading

0 comments on commit a3f93c2

Please sign in to comment.