Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n committed Mar 8, 2023
2 parents eba8e36 + 4751ab6 commit 187b0e7
Show file tree
Hide file tree
Showing 27 changed files with 19,792 additions and 19,864 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dependabot-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Merge me!

on:
pull_request_target:
branches: [ master, next ]

jobs:
merge-me:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: [ master, next ]

env:
CYPRESS_CACHE_FOLDER: cypress/cache
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.8
16.13.2
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

FROM nginx:1.23.3-alpine

RUN apk update && apk add --no-cache "nodejs>=16.17.1-r0"
RUN apk update && apk add --no-cache "nodejs>=18.14.1-r0 "

LABEL maintainer="fehguy"

Expand Down
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-bundle.js.map

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-es-bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 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.

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

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.

5 changes: 5 additions & 0 deletions docker/docker-entrypoint.d/40-swagger-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ if [[ -f "$SWAGGER_JSON" ]]; then
sed -i "s|http://example.com/api|$REL_PATH|g" $INITIALIZER_SCRIPT
fi

# enable/disable the address and port for IPv6 addresses that nginx listens on
if [[ -n "${PORT_IPV6}" ]]; then
sed -i "s|8080;|8080;\n listen [::]:${PORT_IPV6};|g" $NGINX_CONF
fi

# replace the PORT that nginx listens on if PORT is supplied
if [[ -n "${PORT}" ]]; then
sed -i "s|8080|${PORT}|g" $NGINX_CONF
Expand Down
5 changes: 1 addition & 4 deletions docs/development/setting-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ Swagger UI includes a development server that provides hot module reloading and
### Prerequisites

- git, any version

SwaggerUI Node.js support closely follows [Node.js Release Statuses](https://nodejs.org/en/about/releases/)
and is only expected to work on `Current`, `Active LTS` and `Maintanenace LTS` versions of Node.js.
SwaggerUI may also work on `Pending` or `EOL` versions of Node.js, but it's not guaranteed.
- **Node.js >=16.13.2** and **npm >=8.1.2** are the minimum required versions that this repo runs on, but we recommend using the latest version of Node.js@16

### Steps

Expand Down
6 changes: 4 additions & 2 deletions docs/usage/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

### NPM Registry

We publish two modules to npm: **`swagger-ui`** and **`swagger-ui-dist`**.
We publish three modules to npm: **`swagger-ui`**, **`swagger-ui-dist`** and **`swagger-ui-react`**.

**`swagger-ui`** is meant for consumption by JavaScript web projects that include module bundlers, such as Webpack, Browserify, and Rollup. Its main file exports Swagger UI's main function, and the module also includes a namespaced stylesheet at `swagger-ui/dist/swagger-ui.css`. Here's an example:
**`swagger-ui`** is meant for consumption by JavaScript web projects that include module bundlers,
such as Webpack, Browserify, and Rollup. Its main file exports Swagger UI's main function,
and the module also includes a namespaced stylesheet at `swagger-ui/dist/swagger-ui.css`. Here's an example:

```javascript
import SwaggerUI from 'swagger-ui'
Expand Down
6 changes: 6 additions & 0 deletions flavors/swagger-ui-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ Controls the display of vendor extension (`x-`) fields and values for Operations

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

#### `showCommonExtensions`: PropTypes.bool

Controls the display of extensions (pattern, maxLength, minLength, maximum, minimum) fields and values for Parameters.

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

#### `showMutatedRequest`: PropTypes.bool

If set to `true`, uses the mutated request returned from a requestInterceptor to produce the curl command in the UI, otherwise the request before the requestInterceptor was applied is used.
Expand Down
3 changes: 3 additions & 0 deletions flavors/swagger-ui-react/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default class SwaggerUI extends React.Component {
showMutatedRequest: typeof this.props.showMutatedRequest === "boolean" ? this.props.showMutatedRequest : true,
deepLinking: typeof this.props.deepLinking === "boolean" ? this.props.deepLinking : false,
showExtensions: this.props.showExtensions,
showCommonExtensions: this.props.showCommonExtensions,
filter: ["boolean", "string"].includes(typeof this.props.filter) ? this.props.filter : false,
persistAuthorization: this.props.persistAuthorization,
withCredentials: this.props.withCredentials,
Expand Down Expand Up @@ -122,6 +123,7 @@ SwaggerUI.propTypes = {
presets: PropTypes.arrayOf(PropTypes.func),
deepLinking: PropTypes.bool,
showExtensions: PropTypes.bool,
showCommonExtensions: PropTypes.bool,
filter: PropTypes.oneOfType([
PropTypes.string,
PropTypes.bool,
Expand All @@ -146,6 +148,7 @@ SwaggerUI.defaultProps = {
deepLinking: false,
displayRequestDuration: false,
showExtensions: false,
showCommonExtensions: false,
filter: false,
requestSnippetsEnabled: false,
requestSnippets: {
Expand Down
Loading

0 comments on commit 187b0e7

Please sign in to comment.