This repository store NodeJS parser for exports from Insomnia or Postman.
Depending on your export, you must first convert the data into an object that can be usable by the markdown generation script.
- Create your collection and organize your requests by entities (database tables for example)
- Right click on a collection > Get public link
- Open the link in your browser and save it in a json file
- Start the script
npm run postman-parser FILEPATH > data-parsed.jsonafter edit the path to your json file
- Create you request in a specific Workspace
- Export your current Workspace (the parser accept only one Workspace at the same time) in Insomnia v4 (JSON) format
- Start the script with the filepath to your export
npm run insomnia-parser FILEPATH. A new filedata-parsed.jsonwill be created.
Finally, to create the markdown from the parsed data, you just need to run the script npm run markdown-generator.
It will generate the documentation in markdown called api-doc.md.
That's t !