extract-swagger-from-swaggers-to-html

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

Usage no npm install needed!

<script type="module">
  import extractSwaggerFromSwaggersToHtml from 'https://cdn.skypack.dev/extract-swagger-from-swaggers-to-html';
</script>

README

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