Created
September 8, 2016 16:13
-
-
Save antoniogarrote/a9831d19250ecf3c59e21cc5f3f39fee 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_3_2 | |
mediaType: [ application/ld+json, application/json, application/xml ] | |
types: | |
URI: string | |
Link: | |
properties: | |
@id: URI | |
Context: | |
properties: | |
@vocab: URI | |
User: | |
properties: | |
@context: Context | |
@id: URI | |
email: string | |
name: string | |
todos: Link | |
Todo: | |
properties: | |
@context: Context | |
@id: URI | |
title: string | |
description: string | |
user: Link | |
Collection: | |
properties: | |
@context: Context | |
@id: URI | |
members: Link[] | |
/users: | |
get: | |
description: Gets all the users in the service | |
responses: | |
200: | |
body: Collection | |
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: Collection | |
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