api-blueprint-cli

A API blueprint generator from comment

Usage no npm install needed!

<script type="module">
  import apiBlueprintCli from 'https://cdn.skypack.dev/api-blueprint-cli';
</script>

README

API Blueprint generator Build Status

This is a cli that extract comment on file for API Blueprint

A common use case is to auto generate API documentation and upload to Apiary.

Installation

npm i -g api-blueprint-cli

Usage

blueprint --help
# A API blueprint generator from comment
#
# Usage:
# 	$ blueprint <file_path>
#
# Options:
# 	-j, --json Print as JSON API Element
#
# Examples:
# 	$ blueprint index.js

blueprint routes.js
# FORMAT: 1A
# # My API
# Api
# # Group questions
# Questions related API Points
# ## Question Collection [/questions]

Example

// routes.js
'use strict';
// FORMAT: 1A
// # My API
// Api

const app = require('koa')();
const router = require('koa-router')();

// # Group questions
// Questions related API Points
// ## Question Collection [/questions]
router.get('/questions', question.get);

Related

License

MIT © Yu Jin Lim