GithubHelp home page GithubHelp logo

jsynowiec / api-blueprint-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
74.0 4.0 15.0 33 KB

Minimalistic boilerplate to quick-start API specification using API Blueprint description language.

License: MIT License

Ruby 0.28% API Blueprint 97.94% JavaScript 1.78%
api-blueprint project-template specification starter-template boilerplate api rest-api mson

api-blueprint-boilerplate's Introduction

Dev dependencies

Node.js version NPM version Ruby version Bundler version

MIT License Roadmap PRs Welcome Donate

Watch on GitHub Star on GitHub Tweet

api-blueprint-boilerplate

Minimalistic boilerplate to quick-start API specification using API Blueprint description language.

Provides a basic template for REST API documentation that contains some best practices for a pragmatic RESTful API and a set of tools to validate API Blueprint schema or export specification to HTML files.

Sample project is available in Apary: http://docs.apiblueprintboilerplate.apiary.io/

Quick start

This project requires Node.js 6.2+, NPM, Ruby and Bundler. So just make sure you have those installed. Then just type following commands:

git clone https://github.com/jsynowiec/api-blueprint-boilerplate
cd api-blueprint-boilerplate
npm install
bundle install
npm start

You now have a local preview server available at http://localhost:8080 that is validating and rendering your blueprint using Apiary CLI.

Testing against specification

To test the blueprint run npm test command. This will validate the schema using Drafter.js library.

Export HTML files

To compile the blueprint run npm run build. Files will be written to the build directory.

Publishing to Apiary

To publish your blueprint to Apiary.io you have to set two environment variables:

export APIARY_API_KEY="<token>"
export APIARY_API_NAME="<apiary project name>"

After that, you can run npm run publish command to upload your blueprint to Apiary project. You can also provide those two values before the command

APIARY_API_KEY="<token>" APIARY_API_NAME="<apiary project name>" npm run publish

Resources

License

MIT License. See the LICENSE file.

api-blueprint-boilerplate's People

Contributors

cwj5 avatar jsynowiec avatar svemir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

api-blueprint-boilerplate's Issues

Apiary error with Pipelines

Hi, I am receiving an error when trying to publish to Apriary from Bitbucket Pipelines. Does the boilerplate still work? Has Apiary changed such that it is broken?

�+ npm run publish

[email protected] publish /opt/atlassian/pipelines/agent/build
apiary publish --api-name="sprapi1" --path="api.apib"
/usr/local/bundle/gems/json-1.8.6/lib/json/common.rb:155:in `parse': 784: unexpected token at '<!doctype html> (JSON::ParserError)

... npm ERR! Tell the author that this fails on your system: npm ERR! apiary publish --api-name="sprapi1" --path="api.apib"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.