-
Notifications
You must be signed in to change notification settings - Fork 22
/
sample.raml
176 lines (171 loc) · 4.03 KB
/
sample.raml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#%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: