Skip to content

Instantly share code, notes, and snippets.

@elmariofredo
Created July 15, 2014 10:58
Show Gist options
  • Save elmariofredo/f89c54c126680dad6136 to your computer and use it in GitHub Desktop.
Save elmariofredo/f89c54c126680dad6136 to your computer and use it in GitHub Desktop.
Example of failing API with static URI parameters
FORMAT: 1A
HOST: http://localhost
# example api
Is example api
# Group Users
Users related resources of the **Users API**
## Users Collection [/users]
### Create a User [POST]
+ Request (application/json; charset=utf-8)
{
"label": "Mario"
}
+ Response 201 (application/json; charset=utf-8)
+ Schema
{
"$schema": "http://json-schema.org/draft-03/schema#",
"type": "object",
"required": true,
"properties": {
"_id": {
"type": "string",
"required": true
},
"label": {
"type": "string",
"required": true
}
}
}
## User [/users/{id}]
A single User object with all its details
+ Parameters
+ id (required, string, `53c4f8314d84769d9f61ec87`) ... ObjectID `id` of the User to perform action with. Has example value.
### Remove a User [DELETE]
+ Response 204
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment