leanapi

1.6.1 • Public • Published

LeanAPI

LeanAPI generates a nice UI for your API specifications.

Supported API specification formats:

Usage

Install using the following command:

npm install -g leanapi

Generate documentation using the following command:

leanapi path/to/your/api/definition.raml

This will generate a new folder called api-docs where all of the neccesary files have been generated. You can deploy this folder to any webserver.

Options

Output folder

You can specify the ouptput folder by using -o or --output, example:

leanapi -o docs path/to/your/api/definition.raml

Serve

You can dynamically serve your API (without generating the API output) by using -s or --serve, example:

leanapi -s path/to/your/api/definition.raml

This will also start watching in your definition path (e.g. path/to/your/api), so when you make a change to any file in that folder the api definition will update automatically and any open browser window will automatically refresh.

Port

You can set the port on which the API server will be listening (default is 9876) by using -p or --port

leanapi -s -p 9090 path/to/your/api/definition.raml

This will make the server listen on port 9090

Help

You can prompt the help info by running:

leanapi -h
# or
leanapi --help

Version

You can check the leanAPI version by running:

leanapi -V
# or
leanapi --version

Dependencies (25)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i leanapi

    Weekly Downloads

    1

    Version

    1.6.1

    License

    MIT

    Unpacked Size

    53.2 kB

    Total Files

    26

    Last publish

    Collaborators

    • bastuijnman