Skip to content

tapptitude/rest-api-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rest API Extractor

About

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!

Features

  • Pretty prints to console the endpoints with body params, query params and used headers
  • Generates a Postman collection with all the endpoints

Requirements

  • NodeJS 10+
  • Npm

Installation

# Install the required packages
npm install

# Optional install ts-node globally to use standalone
npm install -g ts-node

Running the application

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

Building

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

Status

This project is in a work in progress state. Any changes might and probablly will change the output and behaviour of the app.

Contribution

Feel free to Fork, submit Pull Requests or send us your feedback and suggestions!

License

Rest-api-extractor is available under the Apache License Version 2.0. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published