Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
raml-module-builder/domain-models-api-interfaces/ramls/sample.raml
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
176 lines (171 sloc)
4.03 KB
This file contains 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: e-BookMobile API | |
baseUri: http://localhost:8081 | |
version: v1 | |
types: | |
book: !include book.schema | |
books: !include books.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 | |
publicationDate: | |
displayName: Pub Date | |
type: date-only | |
description: The date released for the first time in the US | |
example: 1984-07-10 | |
required: true | |
score: | |
displayName: Score | |
type: number | |
description: Score | |
example: 1.00 | |
required: false | |
default: 0.0 | |
rating: | |
displayName: Rating | |
type: number | |
description: Average rating (1-5) submitted by users | |
example: 3.14 | |
required: false | |
edition: | |
displayName: Edition | |
type: integer | |
example: 2 | |
required: false | |
isbn: | |
displayName: ISBN | |
type: string | |
example: 0321736079? | |
available: | |
displayName: Whether item is avaiable | |
type: boolean | |
example: false | |
required: false | |
default: true | |
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: | |
schema: book | |
responses: | |
201: | |
headers: | |
Location: | |
body: | |
application/json: | |
400: | |
body: | |
text/plain: | |
422: | |
body: | |
text/plain: | |
500: | |
body: | |
text/plain: | |
get: | |
queryParameters: | |
query: | |
displayName: CQL query | |
type: string | |
description: CQL query | |
example: title=water | |
required: false | |
responses: | |
200: | |
body: | |
application/json: | |
schema: books | |
400: | |
body: | |
text/plain: | |
422: | |
body: | |
text/plain: | |
500: | |
body: | |
text/plain: | |
options: | |
description: "Preflight CORS for /rmbtests/test" | |
responses: | |
200: | |
description: "Return with appropriate CORS headers" | |
/testStream: | |
post: | |
body: | |
application/octet-stream: | |
responses: | |
200: | |
body: | |
application/json: | |
400: | |
body: | |
text/plain: | |
500: | |
body: | |
text/plain: | |
/testForm: | |
post: | |
body: | |
application/x-www-form-urlencoded: | |
responses: | |
200: | |
body: | |
application/json: | |
400: | |
body: | |
text/plain: | |
500: | |
body: | |
text/plain: |