The Apiary Blueprint Parser is currently frozen. There is no future development planned.
Please check the new API Blueprint which supersedes the Apiary Blueprint and is completely open-sourced including its parser, tools and bindings.
$ npm install apiary-blueprint-parser
Do not install the parser globally (using the
-g option), otherwise you won’t be able to use the API.
Download the latest browser version of the parser.
In Node.js, require the module:
var ApiaryBlueprintParser = ;
In browser, include the browser version of the parser in your web page or
application using the
<script> tag. The parser will be available in the
ApiaryBlueprintParser global object.
To parse an API blueprint, just call the
parse method and pass the blueprint
as a parameter. The method will return an object representing the parsed
blueprint or throw an exception if the input is invalid:
var blueprint = ApiaryBlueprintParser;var resource = blueprintsections0resources0;console // prints "Root resource"console // prints "GET"console // prints "/"console // prints "200"
src/ast.coffee file to get an idea about returned objects and their
The exception thrown in case of error will contain
message properties with more details about the error.
The parser should run well in the following environments:
The parser should also work in IE 8, but this is not fully tested because the test suite runs correctly only in IE 9+.