# coffeerest-api-doc

> Unfancy rest apis, automatic documentation generator extension for coffeerest-api

Latest version **0.1.47** (published 2015-10-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install coffeerest-api-doc
pnpm add coffeerest-api-doc
yarn add coffeerest-api-doc
bun add coffeerest-api-doc
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.47 |
| Published | 2015-10-05 |
| First published | 2015-09-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | coderofsalvation |
| Keywords | coffeerest, coffeescript, rest, api, documentation, generator, documenter |

## Links

- npm: https://www.npmjs.com/package/coffeerest-api-doc
- Repository: https://github.com/coderofsalvation/coffeerest-api-doc
- Issues: https://github.com/coderofsalvation/coffeerest-api-doc/issues
- npm.io page: https://npm.io/package/coffeerest-api-doc

## Dependencies (2)

- [mustache](https://npm.io/package/mustache.md) ^2.1.3
- [json-schema-defaults](https://npm.io/package/json-schema-defaults.md) ^0.1.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.1.47 (latest) — 2015-10-05
- 0.1.46 — 2015-09-30
- 0.1.45 — 2015-09-28
- 0.1.4 — 2015-09-28
- 0.1.3 — 2015-09-28
- 0.1.2 — 2015-09-11
- 0.1.1 — 2015-09-11

## README

Unfancy rest apis, automatic documentation generator extension for coffeerest-api

<img alt="" src="https://github.com/coderofsalvation/coffeerest-api/raw/master/coffeerest.png" width="20%" />


<img alt="" src="https://raw.githubusercontent.com/coderofsalvation/coffeerest-api-doc/master/screenshot.png"/>

## Ouch! Is it that simple?

Just add these fields to your coffeerest-api `model.coffee` specification 

           module.exports = 
             name: "project foo"
    --->     doc:
    --->       version: 1
    --->       projectname: "Project foo"
    --->       logo: "https://github.com/coderofsalvation/coffeerest-api/raw/master/coffeerest.png"
    --->       host: "http://mydomain.com"
    --->       homepage: "http://mydomain.com/about"
    --->       security: "Requests are authorized by adding a 'X-Project-foo: YOURTOKEN' http header"
    --->       description: "Welcome to the Core API Documentation. The Core API is the heart of Project foo and should never be confused with the public api."
    --->       request: 
    --->         curl: "curl -X {{method}} -H 'Content-Type: application/json' -H 'X-Project-Token: YOURTOKEN' '{{url}}' --data '{{payload}}' "
             resources:
               '/book/:category':
                 post:
    --->           description: 'adds a book'
    --->           notes: "does not accept duplicates"
                   payload:
                     foo:  
                       type: "string", 
                       minLength: 5, 
                       required: true 
    --->               default: "foobar"              

## Usage 

    npm install coffeerest-api
    npm install coffeerest-api-doc

for servercode see [coffeerest-api](https://www.npmjs.com/package/coffeerest-api)

## Example output: markdown

    $ coffee server.coffee &
    $ curl -H 'Content-Type: application/json' http://localhost:8080/v1/doc/markdown > apidoc.md
    $ curl -H 'Content-Type: application/json' http://localhost:8080/v1/doc/html     > index.html 

Voila, you have a wonderful markdown document which explains your API.
As a BONUS you get a beautifull html too, which uses bootstrap css.

---
_Source: https://npm.io/package/coffeerest-api-doc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
