Based on https://github.com/rmariuzzo/markdown-swagger
npm install markdown-oas
markdown-oas ./api/swagger/oas.yaml ./README.md
This will read the specified OAS file and generate a table describing the API endpoints inside the target markdown file.
The markdown-oas
script will look for the for the following piece of text inside the target markdown file to do its stuff:
<!-- markdown-oas -->
Everything here will be replaced by markdown-oas
<!-- /markdown-oas -->
node index.js openapi.yaml test.md