jchansen / atmosphere-v2-apiary-docs

Atmosphere API docs for v2 spec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Atmosphere's API Docs for Apiary

view online

Usage

First, install gulp globally:

npm install -g gulp

Then, install the node modules:

npm install

Then, add or change any of the files in /src as required.

Then, run gulp to regenerate the apiary.apib file. This repository is linked to Apiary and will be copied over when it changes.

gulp

Development

Apiary provides tools to see your docs locally before they are hosted online.

sudo gem install apiaryio

Now start a server on localhost:8080, in the directory containing the apiary.apib. This server will watch for changes (after running gulp).

apiary preview --server

Debugging changes made to the API Blueprint

For now, the best API Blueprint validator is here: https://github.com/JakubOnderka/api-blueprint-validator To validate the latest changes you made (After running gulp):

npm install api-blueprint-validator
node ./node_modules/.bin/api-blueprint-validator apiary.apib
# An example of what an error would look like:
Error: Undefined resource model Image Version Boot Script on line 1034
# An example of what a success message looks like: (Note that it also produces an 'error')
/opt/dev/atmosphere-v2-apiary-docs/node_modules/api-blueprint-validator/src/validator.js:74
      result.warnings.forEach(function (warning) {
                      ^
TypeError: Cannot call method 'forEach' of undefined
    at /opt/dev/atmosphere-v2-apiary-docs/node_modules/api-blueprint-validator/src/validator.js:74:23

About

Atmosphere API docs for v2 spec


Languages

Language:API Blueprint 98.3%Language:JavaScript 1.7%