Giter Club home page Giter Club logo

api-blueprint's Introduction

API Blueprint

Web API language

# GET /message
+ Response 200 (text/plain)
	
    Hello World!

More Examples | I speak Hypermedia

What is API Blueprint?

API Blueprint is a lightweight, documentation-oriented domain specific language (DSL) for easily designing, building and documenting Web APIs. API Blueprint is a form of Markdown. It is easy to learn and read; perfect for comprehensive documentation but also for quick prototyping and collaboration.

TL;DR

  • Web API language
  • Pure Markdown
  • Designed for humans
  • Understandable by machines

Write, read and share

Prototype, design and document your API using a Markdown formatting of your liking.

Stay clean & tidy

# My API
My API rocks! 
 
## GET /message
- response 200 (application/json)
	
		{ "message": 'Hello World!' }

or go large

My API
======

My API rocks! 

GET /message
-------------

+ Response 200 (application/json)

		{ 
			"message": 'Hello World!' 
		}

Parse & integrate

Parse your API Blueprint and integrate with your tools & frameworks.

Use a Command-line interface

JSON

$ snowcrash --format=json my_api.md
{
  "metadata": [],
  "name": "My API",
  "description": "My API rocks! \n\n",
  "resourceGroups": [
    {
      "name": "",
      "description": "",
      "resources": [
        {
          "uriTemplate": "/message",
          "name": "",
          "description": "",
          "headers": [],
          "object": {
            "name": "",
            "description": "",
            "headers": [],
            "body": "",
            "schema": ""
          },
          "methods": [
            {
              "method": "GET",
              "name": "",
              "description": "",
              "headers": [],
              "requests": [],
              "responses": [
                {
                  "name": "200",
                  "description": "",
                  "headers": [
                    {
                      "name": "Content-Type",
                      "value": "application/json"
                    }
                  ],
                  "body": "{ \"message\": 'Hello World!' }    \n",
                  "schema": ""
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

YAML

$ snowcrash --format=yaml my_api.md
name: My API
description: "My API rocks! \n\n"
resourceGroups:
- name:
  description:
  resources:
  - uri: /message
    name:
    description:
    object:
    methods:
    - method: GET
      name:
      description:
      responses:
      - name: 200
        description:
        body: "{ "message": 'Hello World!' }\n"
        schema:
        headers:
        - Content-Type: application/json

Getting started

View examples

Start with the API Blueprint Tutorial or just browse the examples.

Get the API Blueprint Parser

Get Snow Crash โ€“ the Canonical API Blueprint Parser.

Or one of its bindings

Refer to the Snow Crash [bindings]((https://github.com/apiaryio/snowcrash#bindings).

  • Node.js: Protagonist
  • Ruby: none yet - we're looking for contributors
  • Python: none yet - we're looking for contributors
  • Java: none yet - we're looking for contributors
  • PHP: none yet - we're looking for contributors

Have a question?

Ask at Stack Overflow, make sure to use the apiblueprint tag.

Alternatively, if you are a contributor, check out the API Blueprint Developers Discussion Group.

Version

What's next?

API Blueprint Roadmap

Refer to the API Blueprint Roadmap Wiki Page.

Brew Parser

not ready yet, work in progress

$ brew install snowcrash
$ snowcrash --help

License

MIT License. See the LICENSE file.

api-blueprint's People

Contributors

ifpingram avatar kuba-kubula avatar zdne avatar

Watchers

 avatar  avatar  avatar  avatar

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.