Extract endpoint informations from your Express API written in Typescript.
This project makes use of the TSQuery library in order to extract and parse data from typescript files. To see how to use TSQuery, head over to their github page or check out what it does on the playground!
- Pretty prints to console the endpoints with body params, query params and used headers
- Generates a Postman collection with all the endpoints
- NodeJS 10+
- Npm
# Install the required packages
npm install
# Optional install ts-node globally to use standalone
npm install -g ts-node
Simple run using npm scripts:
npm start ~/path/server.ts
Run with options using npm scripts:
npm start -- ~/path/server.ts --print --postman "My API Collection"
Run standalone with ts-node:
ts-node src/index.ts ~/path/server.ts --print --postman "My API Collection"
Check out the script parameters and other informations:
ts-node src/index.ts --help
Bundling of the app is handled by backpack:
# This will generate /build/main.js
npm run build
After building you can run it using node:
node build/main.js --help
This project is in a work in progress state. Any changes might and probablly will change the output and behaviour of the app.
Feel free to Fork, submit Pull Requests or send us your feedback and suggestions!
Rest-api-extractor is available under the Apache License Version 2.0. See the LICENSE file for more info.