Skip to content

Instantly share code, notes, and snippets.

@fallenhitokiri
Last active February 25, 2016 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fallenhitokiri/7c39106098f7a24230df to your computer and use it in GitHub Desktop.
Save fallenhitokiri/7c39106098f7a24230df to your computer and use it in GitHub Desktop.
api blueprint example how to plueprint
FORMAT: 1A
# Foo API
API for Foo
# Group Foo
Foo API
## Login [/api/login]
Authenticate user and returns api token for use in subsequent requests.
### Authenticate user [POST]
+ Request (application/json)
{
"email":"joe@foo.com",
"password":"qq"
}
+ Header
VERSION: "1.0.0"
+ Response 200 (application/json)
+ Body
{
"token": "20fb05c8a42fb346fe578b61296a63e2833ddab1",
"user_id": 3456
}
+ Response 400 (application/json)
Returned when the incorrect email/password is used.
+ Body
{
"non_field_errors": [
"Unable to log in with provided credentials."
]
}
@fallenhitokiri
Copy link
Author

line 36 needs to be indented and an empty line needs to be inserted before
section "header" is unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment