1.0.6 • Published 2 years ago

mk-swagger-ui v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Swagger UI dist generator based on OpenAPI YAML

Overview:

This package provides several simple CLI tools which makes easier to works with Swagger/OpenAPI. One of tools has same name as the package: mk-swagger-ui. So you can use it via npx, wihout installing.

For the other tools, you would have to install this npm package first. Then, you would be able to use npx to launch those additional tools.


Run mk-swagger-ui:

  • make a new empty folder
  • place OpenAPI/Swagger YAML file there. You should have a folder with a single file, e.g. filename.yaml
  • Optionally run: npm install mk-swagger-ui
  • npx mk-swagger-ui filename.yaml

What you would get:

  • the tool would generate dist folder with static html/js files from Swagger-UI package
  • you can navigate to http://localhost:3000 to preview the Swagger-UI package
  • please view generated ./dist folder - you can deploy it to a webserver

If you installed the NPM package locally:

You would have a few additional commands, that can be run now via npx. If you did not install the package with -g option -- make sure to run npx command while being in directory where you installed the package.

  • npx get-editor - to get the Swagger Editor package from github
  • npx get-ui - to get the Swagger UI package from github
  • npx get-codegen - to get the Swagger Codegen package from github

Sum up - Results

  • The folder dist has been created with static Swagger UI files
  • Your OpenAPI YAML file has been converted to JSON format. The JSON file placed to dist folder
  • Swagger UI has been configured to use your JSON file
  • You can host your static files from the dist folder on any web server
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago