Skip to content

Instantly share code, notes, and snippets.

@gbougeard
Last active August 29, 2015 13:57
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 gbougeard/9772698 to your computer and use it in GitHub Desktop.
Save gbougeard/9772698 to your computer and use it in GitHub Desktop.
RAML sample of a Foo REST API
#%RAML 0.8
title: Foo REST API
version: v1
baseUri: http://api.mydomain.com/{version}
/places:
get:
queryParameters:
s:
displayName: Sort column
type: number
description: Sort column index
example: 1
p:
displayName: Page index
type: number
example : 0
description: |
List all places
post:
description: |
Create a place
responses:
201 :
description: |
Creation successful
/{id}:
uriParameters:
id:
type: number
description: |
Id of a place
get:
description: |
View a place
responses:
404 :
description: |
No place found for this id
200 :
body:
application/json:
post:
description: |
Update a place
responses:
200 :
description: |
Update successful
delete:
description: |
Delete a place
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment