Skip to content

Commit aeb2726

Browse files
authored
Merge branch 'master' into master
2 parents eb55634 + 8e15218 commit aeb2726

File tree

311 files changed

+12676
-10917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

311 files changed

+12676
-10917
lines changed

.browserslistrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
maintained node versions
33

44
[node-development]
5-
node 20.3.0
5+
node 22
66

77
[browser-production]
88
> 1%
@@ -26,4 +26,4 @@ maintained node versions
2626
last 1 chrome version
2727
last 1 firefox version
2828
last 1 safari version
29-
node 20.3.0
29+
node 22

.eslintrc

-38
This file was deleted.

.eslintrc.js

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/**
2+
* @prettier
3+
*/
4+
const path = require("node:path")
5+
6+
module.exports = {
7+
parser: "@babel/eslint-parser",
8+
env: {
9+
browser: true,
10+
node: true,
11+
es6: true,
12+
jest: true,
13+
"jest/globals": true,
14+
},
15+
parserOptions: {
16+
ecmaFeatures: { jsx: true },
17+
babelOptions: { configFile: path.join(__dirname, "babel.config.js") },
18+
},
19+
extends: [
20+
"eslint:recommended",
21+
"plugin:react/recommended",
22+
"plugin:prettier/recommended",
23+
],
24+
plugins: ["react", "import", "jest", "prettier"],
25+
settings: {
26+
react: {
27+
pragma: "React",
28+
version: "15.0",
29+
},
30+
},
31+
rules: {
32+
semi: [2, "never"],
33+
strict: 0,
34+
quotes: [
35+
2,
36+
"double",
37+
{
38+
avoidEscape: true,
39+
allowTemplateLiterals: true,
40+
},
41+
],
42+
"no-unused-vars": 2,
43+
"no-multi-spaces": 1,
44+
camelcase: [
45+
"error",
46+
{
47+
allow: [
48+
"^UNSAFE_",
49+
"^requestSnippetGenerator_",
50+
"^JsonSchema_",
51+
"^curl_",
52+
"^dom_",
53+
"^api_",
54+
"^client_",
55+
"^grant_",
56+
"^code_",
57+
"^redirect_",
58+
"^spec",
59+
],
60+
},
61+
],
62+
"no-use-before-define": [2, "nofunc"],
63+
"no-underscore-dangle": 0,
64+
"no-unused-expressions": 1,
65+
"comma-dangle": 0,
66+
"no-console": [
67+
2,
68+
{
69+
allow: ["warn", "error"],
70+
},
71+
],
72+
"react/jsx-no-bind": 1,
73+
"react/jsx-no-target-blank": 2,
74+
"react/display-name": 0,
75+
"import/no-extraneous-dependencies": 2,
76+
"react/jsx-filename-extension": 2,
77+
},
78+
}

.github/workflows/dependabot-merge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# will not occur.
1818
- name: Dependabot metadata
1919
id: dependabot-metadata
20-
uses: dependabot/fetch-metadata@v2.2.0
20+
uses: dependabot/fetch-metadata@v2.3.0
2121
with:
2222
github-token: "${{ secrets.GITHUB_TOKEN }}"
2323
# Here the PR gets approved.

.github/workflows/docker-image-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Run Trivy vulnerability scanner
1616
uses: aquasecurity/trivy-action@master
1717
with:
18-
image-ref: 'docker.io/swaggerapi/swagger-ui:unstable'
18+
image-ref: 'docker.swagger.io/swaggerapi/swagger-ui:unstable'
1919
format: 'table'
2020
exit-code: '1'
2121
ignore-unfixed: true

.lintstagedrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"*.js": "eslint"
2+
"*.{js,jsx}": ["eslint --max-warnings 0"],
3+
"*.scss": ["stylelint '**/*.scss'"]
34
}

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.3.0
1+
22.11.0

.releaserc

+9-19
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
{
22
"branches": [
3-
{
4-
"name": "master"
5-
},
6-
{
7-
"name": "next",
8-
"channel": "alpha",
9-
"prerelease": "alpha"
10-
}
3+
{"name": "master"}
114
],
125
"tagFormat": "v${version}",
136
"plugins": [
@@ -21,15 +14,12 @@
2114
"@semantic-release/release-notes-generator",
2215
"@semantic-release/npm",
2316
"@semantic-release/github",
24-
[
25-
"@semantic-release/git",
26-
{
27-
"assets": [
28-
"package.json",
29-
"package-lock.json"
30-
],
31-
"message": "chore(release): cut the ${nextRelease.version} release\n\n${nextRelease.notes}"
32-
}
33-
]
17+
["@semantic-release/git", {
18+
"assets": [
19+
"package.json",
20+
"package-lock.json"
21+
],
22+
"message": "chore(release): cut the ${nextRelease.version} release\n\n${nextRelease.notes}"
23+
}]
3424
]
35-
}
25+
}

Dockerfile

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22
# We don't declare them here — take a look at our docs.
33
# https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md
44

5-
FROM nginx:1.27.3-alpine
5+
FROM nginx:1.27.4-alpine
66

7-
RUN apk add --update-cache --no-cache "nodejs"
7+
LABEL maintainer="vladimir.gorej@gmail.com" \
8+
org.opencontainers.image.authors="vladimir.gorej@gmail.com" \
9+
org.opencontainers.image.url="docker.swagger.io/swaggerapi/swagger-ui" \
10+
org.opencontainers.image.source="https://github.com/swagger-api/swagger-ui" \
11+
org.opencontainers.image.description="SwaggerUI Docker image" \
12+
org.opencontainers.image.licenses="Apache-2.0"
13+
14+
RUN apk add --update-cache --no-cache "nodejs" "libxml2>=2.13.4-r4"
815

916
LABEL maintainer="char0n"
1017

README.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
![total GitHub contributors](https://img.shields.io/github/contributors-anon/swagger-api/swagger-ui.svg)
77

88
![monthly npm installs](https://img.shields.io/npm/dm/swagger-ui.svg?label=npm%20downloads)
9-
![total docker pulls](https://img.shields.io/docker/pulls/swaggerapi/swagger-ui.svg)
9+
![docker registry](https://img.shields.io/badge/docker-docker.swagger.io%2Fswaggerapi%2Fswagger--ui-blue)
1010
![monthly packagist installs](https://img.shields.io/packagist/dm/swagger-api/swagger-ui.svg?label=packagist%20installs)
1111
![gzip size](https://img.shields.io/bundlephobia/minzip/swagger-ui.svg?label=gzip%20size)
1212

@@ -33,17 +33,18 @@ If you are looking for plain ol' HTML/JS/CSS, [download the latest release](http
3333
## Compatibility
3434
The OpenAPI Specification has undergone 5 revisions since initial creation in 2010. Compatibility between Swagger UI and the OpenAPI Specification is as follows:
3535

36-
| Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes |
37-
|--------------------|--------------|----------------------------------------|-----------------------------------------------------------------------|
38-
| 5.0.0 | 2023-06-12 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0 | [tag v5.0.0](https://github.com/swagger-api/swagger-ui/tree/v5.0.0) |
39-
| 4.0.0 | 2021-11-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v4.0.0](https://github.com/swagger-api/swagger-ui/tree/v4.0.0) |
40-
| 3.18.3 | 2018-08-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v3.18.3](https://github.com/swagger-api/swagger-ui/tree/v3.18.3) |
41-
| 3.0.21 | 2017-07-26 | 2.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21) |
42-
| 2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10) |
43-
| 2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
44-
| 2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |
45-
| 1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) |
46-
| 1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) |
36+
| Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes |
37+
|--------------------|--------------|------------------------------------------------------|-----------------------------------------------------------------------|
38+
| 5.19.0 | 2025-02-17 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1 | [tag v5.19.0](https://github.com/swagger-api/swagger-ui/tree/v5.19.0) |
39+
| 5.0.0 | 2023-06-12 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0 | [tag v5.0.0](https://github.com/swagger-api/swagger-ui/tree/v5.0.0) |
40+
| 4.0.0 | 2021-11-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v4.0.0](https://github.com/swagger-api/swagger-ui/tree/v4.0.0) |
41+
| 3.18.3 | 2018-08-03 | 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 | [tag v3.18.3](https://github.com/swagger-api/swagger-ui/tree/v3.18.3) |
42+
| 3.0.21 | 2017-07-26 | 2.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21) |
43+
| 2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10) |
44+
| 2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
45+
| 2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |
46+
| 1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) |
47+
| 1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) |
4748

4849
## Anonymized analytics
4950

config/jest/jest.unit.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ module.exports = {
1818
moduleNameMapper: {
1919
'^.+\\.svg$': 'jest-transform-stub'
2020
},
21-
transformIgnorePatterns: ['/node_modules/(?!(sinon|react-syntax-highlighter)/)'],
21+
transformIgnorePatterns: ['/node_modules/(?!(sinon|react-syntax-highlighter|@asamuzakjp/css-color)/)'],
2222
silent: true, // set to `false` to allow console.* calls to be printed
2323
};

dist/swagger-ui-bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-es-bundle-core.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-es-bundle-core.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-es-bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-standalone-preset.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/development/scripts.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Script name | Description
1010
`lint` | Report ESLint style errors and warnings.
1111
`lint-errors` | Report ESLint style errors, without warnings.
1212
`lint-fix` | Attempt to fix style errors automatically.
13+
`lint-styles` | Report Stylelint style errors and warnings.
14+
`lint-styles-fix` | Attempt to fix Stylelint errors and warnings automatically.
1315
`watch` | Rebuild the core files in `/dist` when the source code changes. Useful for `npm link` with Swagger Editor.
1416

1517
### Building

docs/development/setting-up.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# Setting up a dev environment
22

3-
Swagger UI includes a development server that provides hot module reloading and unminified stack traces, for easier development.
3+
SwaggerUI includes a development server that provides hot module reloading and unminified stack traces, for easier development.
44

55
### Prerequisites
66

77
- git, any version
8-
- **Node.js >=20.3.0** and **npm >=9.6.7** are the minimum required versions that this repo runs on, but we always recommend using the latest version of Node.js.
8+
- **Node.js >=22.11.0** and **npm >=10.9.0** are the minimum required versions that this repo runs on, but we always recommend using the latest version of Node.js.
9+
10+
911

1012
### Steps
1113

1214
1. `git clone https://github.com/swagger-api/swagger-ui.git`
1315
2. `cd swagger-ui`
1416
3. `npm install`
15-
4. `npm run dev`
16-
5. Wait a bit
17-
6. Open http://localhost:3200/
17+
4. `npx husky init` (optional)
18+
5. `npm run dev`
19+
6. Wait a bit
20+
7. Open http://localhost:3200/
1821

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

docs/samples/webpack-getting-started/src/swagger-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: "3.0.0"
1+
openapi: "3.0.4"
22
info:
33
version: "0.0.1"
44
title: "Swagger UI Webpack Setup"

docs/usage/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ Set the value to the literal object value you'd like, taking care to escape char
371371
Example:
372372

373373
```sh
374-
SPEC="{ \"openapi\": \"3.0.0\" }"
374+
SPEC="{ \"openapi\": \"3.0.4\" }"
375375
```
376376

377377
### Docker-Compose

0 commit comments

Comments
 (0)