Keeping Swagger UI up-to-date
Swagger UI is occasionally updated to fix bugs or add compatibility with newer versions of the OpenAPI spec. The project is available on GitHub at https://github.com/swagger-api/swagger-ui .
The SmartComponent Library uses a local version of swagger-ui. This version can be kept up-to-date by downloading the project, building it using the npm tool, and replacing files in the PASOE webapp’s static/swagger folder with updated versions.
To update swagger-ui,
Clone or download the latest version of the swagger-ui repository. This can be done from the GitHub website, or your choice of Git client.
Run
npm run build
from the command-line in the project’s root folder. This requires npm to be installed (see https://docs.npmjs.com/downloading-and-installing-node-js-and-npm for instructions on installing npm). You may need to runnpm install
first, to resolve the project’s dependencies.A successful build will create a dist/ folder in the project. Compare the contents of the <project>/dist/ folder to the <instance>/webapps/<webapp>/static/swagger folder, and copy any changed files into the instance.
Restart the instance.