Skip to content

Instantly share code, notes, and snippets.

@kt3k
Last active August 29, 2015 14:19
Show Gist options
  • Save kt3k/3cb67f0b302777b4e521 to your computer and use it in GitHub Desktop.
Save kt3k/3cb67f0b302777b4e521 to your computer and use it in GitHub Desktop.
RESTful API literate spec

POST /api/user

Creates a user

params

{
  "firstName": "John",
  "lastName": "Doe"
}

result

{
  "firstName": "John",
  "lastName": "Doe"
}

Returns error when the params are empty

params

{}

result

{
  "error": {
    "code": "00001",
    "message": "invalid inputs"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment