Created
September 8, 2016 15:48
-
-
Save antoniogarrote/779de2dfc50fb26a7e9a31d9582f236b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%RAML 1.0 | |
title: Todos Service | |
baseUri: http://todosapp.com/api/version_1 | |
mediaType: [ application/json, application/xml ] | |
types: | |
User: | |
properties: | |
id: string | |
email: string | |
name: string | |
Todo: | |
properties: | |
id: string | |
title: string | |
description: string | |
/users: | |
get: | |
description: Gets all the users in the service | |
responses: | |
200: | |
body: User[] | |
post: | |
description: Creates a new user | |
body: | |
properties: | |
email: string | |
name: string | |
password: string | |
responses: | |
201: | |
headers: | |
Location: | |
type: string | |
/users/{id}: | |
get: | |
description: Information about a single user of the service | |
responses: | |
200: | |
body: User | |
delete: | |
description: Deletes a user from the service | |
/users/{id}/todos: | |
get: | |
description: Lists all the Todos created by a user | |
responses: | |
200: | |
body: Todo[] | |
post: | |
description: Creates a new Todo for a user | |
body: | |
properties: | |
title: string | |
description: string | |
responses: | |
201: | |
headers: | |
Location: | |
type: string | |
/users/{id}/todos/{todo_id}: | |
get: | |
description: Information about a single Todo for a user | |
responses: | |
200: | |
body: Todo | |
delete: | |
description: Deletes a Todo for a User from the service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment