feat: apply cumulative update to address various issues (#10324)

This commit is contained in:
Vladimír Gorej
2025-02-27 11:12:42 +01:00
committed by GitHub
parent 621a7f0f76
commit 80d56c9518
298 changed files with 11066 additions and 11680 deletions

View File

@@ -10,6 +10,8 @@ Script name | Description
`lint` | Report ESLint style errors and warnings.
`lint-errors` | Report ESLint style errors, without warnings.
`lint-fix` | Attempt to fix style errors automatically.
`lint-styles` | Report Stylelint style errors and warnings.
`lint-styles-fix` | Attempt to fix Stylelint errors and warnings automatically.
`watch` | Rebuild the core files in `/dist` when the source code changes. Useful for `npm link` with Swagger Editor.
### Building

View File

@@ -1,20 +1,23 @@
# Setting up a dev environment
Swagger UI includes a development server that provides hot module reloading and unminified stack traces, for easier development.
SwaggerUI includes a development server that provides hot module reloading and unminified stack traces, for easier development.
### Prerequisites
- git, any version
- **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.
- **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.
### Steps
1. `git clone https://github.com/swagger-api/swagger-ui.git`
2. `cd swagger-ui`
3. `npm install`
4. `npm run dev`
5. Wait a bit
6. Open http://localhost:3200/
4. `npx husky init` (optional)
5. `npm run dev`
6. Wait a bit
7. Open http://localhost:3200/
### Using your own local api definition with local dev build

View File

@@ -1,4 +1,4 @@
openapi: "3.0.0"
openapi: "3.0.4"
info:
version: "0.0.1"
title: "Swagger UI Webpack Setup"

View File

@@ -371,7 +371,7 @@ Set the value to the literal object value you'd like, taking care to escape char
Example:
```sh
SPEC="{ \"openapi\": \"3.0.0\" }"
SPEC="{ \"openapi\": \"3.0.4\" }"
```
### Docker-Compose

View File

@@ -10,6 +10,23 @@ We publish three modules to npm: **`swagger-ui`**, **`swagger-ui-dist`** and **`
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:
### Installation
You can now install SwaggerUI packages using `npm`:
```sh
$ npm install swagger-ui
````
```sh
$ npm install swagger-ui-react
````
```sh
$ npm install swagger-ui-dist
````
```javascript
import SwaggerUI from 'swagger-ui'
// or use require if you prefer