extract-swagger-from-swaggers-to-html

1.0.6 • Public • Published

Extract swagger/openapi spec with only required endpoint(s).

download node js

npm i -g extract-swagger-from-swaggers-to-html

npm install commander

npm install js-yaml

npm install -g bootprint

npm install -g bootprint-openapi

npm install fs-extra

npm install download-git-repo

download "repo archi" in "tmp" directory

cd ..\node-vxxxxxxx\node_modules\extract-swagger-from-swaggers-to-html

node bin\extract-swagger --src ../tmp --dest target  "/someRestApi delete put" "/someOtherRestApi/{some-id}/elec-rest put"  "/toto/{titi-id}/news-stream get"

Below works too and give same results!
node bin\extract-swagger --src ../tmp --dest target  "/someRestApi delete" "/someRestApi put" "/someOtherRestApi/{some-id}/elec-rest put"  "/toto/{titi-id}/news-stream get"

for information
* -h generate html
* --src directory of repo git archi with subdirectory systems (default tmp)
* -g downaload archi git repository (necessary to be already authentificated) and write in tmp directory
* if --g is not precised, you need to have repo git archi downloded in tmp directory


TODO:

  1. Fetch source yml from a url
  2. Add swagger schema verification step
  3. Remove unnecessay tags

Package Sidebar

Install

npm i extract-swagger-from-swaggers-to-html

Weekly Downloads

2

Version

1.0.6

License

MIT

Unpacked Size

11.9 kB

Total Files

9

Last publish

Collaborators

  • gregoryb4work