- git, any version
- Node.js >=24.14.0
- NPM >=11.9.0
If you use nvm, running following command inside this repository will automatically pick the right Node.js version for you:
$ nvm usegit clone https://github.com/swagger-api/swagger-js.gitcd swagger-jsnpm installnpm run buildnpm run test
It is often the case that after fixing a bug or implementing a new feature, developer wants to test his changes in Swagger-UI. This section will guide you through how to do that.
1. Clone and install swagger-ui repository
You'll find complete information about how to do that in swagger-ui Setting up documentation.
2. Clone and install swagger-js repository
You'll find complete information about how to do that in Steps section of this document.
3. Link repositories using npm link
$ cd /path/to/swagger-js
$ npm run build
$ npm link
$ cd /path/to/swagger-ui
$ npm link swagger-client4. Make sure npm install is not running
Open /path/to/swagger-ui/package.json in your favorite editor and look for "predev": "npm install"
script. Temporarily delete this line.
$ cd /path/to/swagger-ui
$ npm run devYou're now running your version of swagger-client inside swagger-ui. Test
what you need and continue with following step.
5. Unlink repositories
We have to clean up after we're done. Open /path/to/swagger-ui/package.json
in your favorite editor and return back the "predev": "npm install" script.
$ cd /path/to/swagger-ui
$ npm unlink --no-save swagger-client
$ npm install
$ cd /path/to/swagger-js
$ npm unlink