Permalink
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (89 sloc) 2.3 KB
#%RAML 1.0
title: e-BookMobile API
baseUri: http://localhost:8081
version: v1
types:
book: !include book.schema
traits:
facets: !include raml-util/traits/facets.raml
/rmbtests:
/books:
get:
is: [facets]
queryParameters:
author:
displayName: Author
type: string
description: An author's full name
example: Mary Roach
required: true
publicationYear:
displayName: Pub Year
type: number
description: The year released for the first time in the US
example: 1984
required: true
rating:
displayName: Rating
type: number
description: Average rating (1-5) submitted by users
example: 3.14
required: false
isbn:
displayName: ISBN
type: string
minLength: 10
example: 0321736079?
responses:
200:
body:
application/json:
schema: book
example:
strict: false
value: |
{
"data": {
"id": "SbBGk",
"title": "Stiff: The Curious Lives of Human Cadavers",
"description": "aaaaaa",
"genre": "science",
"author": "Mary Roach",
"link": "http://e-bookmobile.com/books/Stiff"
},
"success": true,
"status": 200,
"metadata": {
"createdDate": "2017-04-01T23:11:00.000Z",
"createdByUserId": "dee12548-9cee-45fa-bbae-675c1cc0ce3b"
}
}
put:
queryParameters:
access_token:
displayName: Access Token
type: number
description: Token giving you permission to make call
required: true
post:
body:
application/json:
schema: book
responses:
201:
body:
application/json:
example: !include examples/book.sample
headers:
Location:
/test:
post:
body:
application/json:
responses:
200:
body:
application/json:
302:
headers:
Location: