Apiary Blueprint AST Convertor
A migration tool for legacy Apiary Blueprint AST into API Blueprint AST. Converts Apiary Blueprint AST serialized into a JSON file to API Blueprint AST JSON representation (vnd.apiblueprint.ast.raw+json; version=2.0
).
Installation
Add this line to your application's Gemfile:
gem 'apiary_blueprint_convertor'
And then execute:
$ bundle
Or install it yourself as:
$ gem install apiary_blueprint_convertor
Usage
$ apiary_blueprint_convertor path/to/legacy/ast.json
See the convert feature for details or run apiary_blueprint_convertor --help
.
Convert Legacy Apiary Blueprint to API Blueprint
Use this convertor together with the legacy Apiary Blueprint Parser and API Blueprint Composer – Matter Compiler.
- Parse Legacy Apiary Blueprint into its JSON AST using
Apiary Blueprint Parser
- Convert legacy JSON AST into API Blueprint JSON AST using
apiary_blueprint_convertor
- Compose API Blueprint from API Blueprint JSON AST using
matter_compiler
For example:
$ blueprint-parser legacy_blueprint.apib | apiary_blueprint_convertor | matter_compiler --format json > new_blueprint.md
Contributing
- Fork this repository (http://github.com/apiaryio/apiary_blueprint_convertor/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
MIT License. See the LICENSE file.