@api-client/core 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/amf/AmfMixin.d.ts +1 -1
- package/build/src/amf/definitions/Api.d.ts +6 -6
- package/build/src/amf/definitions/Shapes.d.ts +2 -2
- package/build/src/amf/models/AmfDataNode.d.ts +1 -1
- package/build/src/cookies/CookieParser.d.ts +1 -1
- package/build/src/lib/parsers/UrlProcessor.d.ts +1 -1
- package/build/src/lib/transformers/PayloadSerializer.d.ts +3 -3
- package/build/src/mocking/LegacyInterfaces.d.ts +1 -1
- package/build/src/models/Authorization.d.ts +3 -3
- package/build/src/models/ClientCertificate.d.ts +4 -4
- package/build/src/models/HttpCookie.d.ts +2 -2
- package/build/src/models/ProjectItem.d.ts +1 -1
- package/build/src/models/Property.d.ts +1 -1
- package/build/src/models/data/DataNamespace.d.ts +1 -1
- package/build/src/models/data/DataProperty.d.ts +2 -2
- package/build/src/models/legacy/actions/Actions.d.ts +5 -5
- package/build/src/models/legacy/authorization/Authorization.d.ts +2 -2
- package/build/src/models/store/Backend.d.ts +2 -2
- package/build/src/models/store/Permission.d.ts +3 -3
- package/build/src/models/transformers/PostmanTransformer.d.ts +1 -1
- package/build/src/models/transformers/PostmanV21Transformer.d.ts +1 -1
- package/build/src/models/transformers/har.d.ts +1 -1
- package/build/src/runtime/http-runner/HttpFlowRunner.d.ts +1 -1
- package/build/src/runtime/node/ProjectParallelRunner.d.ts +1 -1
- package/build/src/runtime/node/ProjectRunner.d.ts +1 -1
- package/build/src/runtime/store/FilesSdk.d.ts +1 -1
- package/data/apis/APIC-483/APIC-483.raml +16 -0
- package/data/apis/APIC-483/example/list-of-bank-succ.json +32 -0
- package/data/apis/APIC-483/schema/response-retrieve-list-bank.json +68 -0
- package/data/apis/arc-demo-api/arc-demo-api.raml +468 -0
- package/data/apis/arc-demo-api/examples/e400.xml +4 -0
- package/data/apis/arc-demo-api/examples/e401.xml +4 -0
- package/data/apis/arc-demo-api/examples/e404.xml +4 -0
- package/data/apis/arc-demo-api/examples/image.xml +5 -0
- package/data/apis/arc-demo-api/examples/messages-example.json +22 -0
- package/data/apis/arc-demo-api/examples/messages-sent-example.json +15 -0
- package/data/apis/arc-demo-api/examples/person.json +14 -0
- package/data/apis/arc-demo-api/examples/person.url.encoded +1 -0
- package/data/apis/arc-demo-api/examples/person.xml +14 -0
- package/data/apis/arc-demo-api/examples/product.xml +9 -0
- package/data/apis/arc-demo-api/library.raml +36 -0
- package/data/apis/arc-demo-api/resourceTypes/app-person.raml +49 -0
- package/data/apis/arc-demo-api/resourceTypes/example-types.raml +45 -0
- package/data/apis/arc-demo-api/resourceTypes/image.raml +23 -0
- package/data/apis/arc-demo-api/resourceTypes/message-sent-type.raml +23 -0
- package/data/apis/arc-demo-api/resourceTypes/message-type.raml +33 -0
- package/data/apis/arc-demo-api/resourceTypes/product.raml +52 -0
- package/data/apis/arc-demo-api/resourceTypes/resource.raml +11 -0
- package/data/apis/arc-demo-api/schemas/error-response.xsd +11 -0
- package/data/apis/arc-demo-api/schemas/image.xsd +11 -0
- package/data/apis/arc-demo-api/schemas/person.json +104 -0
- package/data/apis/arc-demo-api/schemas/person.xsd +26 -0
- package/data/apis/arc-demo-api/schemas/product.xsd +17 -0
- package/data/apis/arc-demo-api/securitySchemes/basic.raml +5 -0
- package/data/apis/arc-demo-api/securitySchemes/oauth_2_0.raml +29 -0
- package/data/apis/arc-demo-api/securitySchemes/x-custom.raml +26 -0
- package/data/apis/arc-demo-api/traits/adminable.raml +23 -0
- package/data/apis/arc-demo-api/traits/pagination.raml +83 -0
- package/data/apis/arc-demo-api/traits/rate-limited.raml +9 -0
- package/data/apis/oas-3-api/oas-3-api.yaml +356 -0
- package/data/apis/petstore/petstore.yaml +954 -0
- package/data/apis/secured-api/oauth-2-custom-settings.raml +143 -0
- package/data/apis/secured-api/oauth2-header-delivery.raml +13 -0
- package/data/apis/secured-api/oauth2-no-delivery.raml +8 -0
- package/data/apis/secured-api/oauth2-no-grants.raml +12 -0
- package/data/apis/secured-api/oauth2-pkce.raml +13 -0
- package/data/apis/secured-api/oauth2-query-delivery.raml +13 -0
- package/data/apis/secured-api/oauth_1_0.raml +8 -0
- package/data/apis/secured-api/oauth_1_0_no-settings.raml +3 -0
- package/data/apis/secured-api/oauth_1_0_no-signature.raml +7 -0
- package/data/apis/secured-api/oauth_1_0_signature.raml +8 -0
- package/data/apis/secured-api/passthrough-querystring.raml +16 -0
- package/data/apis/secured-api/passthrough.raml +24 -0
- package/data/apis/secured-api/secured-api.raml +231 -0
- package/data/apis/secured-api/x-custom.raml +33 -0
- package/data/apis/secured-api/x-other.raml +29 -0
- package/data/apis/secured-api/x-query-string.raml +16 -0
- package/data/model.js +5 -0
- package/data/models/APIC-187.json +13 -3
- package/data/models/APIC-188.json +13 -3
- package/data/models/APIC-233.json +1 -1
- package/data/models/APIC-391.json +23 -2
- package/data/models/APIC-483.json +3088 -0
- package/data/models/APIC-487.json +1 -1
- package/data/models/APIC-655.json +21 -1
- package/data/models/APIC-689.json +21 -1
- package/data/models/APIC-690.json +5 -5
- package/data/models/SE-10469.json +11 -1
- package/data/models/SE-13092.json +35 -5
- package/data/models/SE-22063.json +22 -2
- package/data/models/amf-helper-api.json +740 -42
- package/data/models/arc-demo-api.json +52994 -0
- package/data/models/async-api.json +86 -36
- package/data/models/example-generator-api.json +280 -10
- package/data/models/expanded-api.json +1 -1
- package/data/models/flattened-api.json +1 -1
- package/data/models/multiple-servers.json +1 -1
- package/data/models/oas-3-api.json +10534 -0
- package/data/models/oas-date.json +1 -1
- package/data/models/oas-types.json +1 -1
- package/data/models/oas-unions.json +31 -1
- package/data/models/petstore.json +27477 -0
- package/data/models/raml-date.json +11 -1
- package/data/models/recursive.json +1 -1
- package/data/models/schema-api.json +84 -4
- package/data/models/secured-api.json +19067 -0
- package/data/models/tracked-to-linked.json +88 -4
- package/package.json +3 -3
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
#%RAML 1.0
|
|
2
|
+
title: API body demo
|
|
3
|
+
version: v1
|
|
4
|
+
baseUri: http://{instance}.domain.com/
|
|
5
|
+
|
|
6
|
+
mediaType: [application/json, application/xml]
|
|
7
|
+
protocols: [HTTP, HTTPS]
|
|
8
|
+
|
|
9
|
+
description: |
|
|
10
|
+
This is a description of demo API.
|
|
11
|
+
|
|
12
|
+
This is **markdown**.
|
|
13
|
+
|
|
14
|
+
baseUriParameters:
|
|
15
|
+
instance:
|
|
16
|
+
description: |
|
|
17
|
+
The execution environments. Can be one of:
|
|
18
|
+
- development
|
|
19
|
+
- staging
|
|
20
|
+
- qa
|
|
21
|
+
- production
|
|
22
|
+
type: string
|
|
23
|
+
enum: [development, staging, qa, production]
|
|
24
|
+
pattern: (development|staging|qa|production)
|
|
25
|
+
default: production
|
|
26
|
+
annotationTypes:
|
|
27
|
+
deprecated: string
|
|
28
|
+
annotationTest: nil
|
|
29
|
+
clearanceLevel:
|
|
30
|
+
properties:
|
|
31
|
+
level:
|
|
32
|
+
enum: [ low, medium, high ]
|
|
33
|
+
required: true
|
|
34
|
+
signature:
|
|
35
|
+
pattern: "\\d{3}-\\w{12}"
|
|
36
|
+
required: true
|
|
37
|
+
uses:
|
|
38
|
+
ExampleType: resourceTypes/example-types.raml
|
|
39
|
+
myLib: library.raml
|
|
40
|
+
types:
|
|
41
|
+
Image: !include resourceTypes/image.raml
|
|
42
|
+
Resource: !include resourceTypes/resource.raml
|
|
43
|
+
AppPerson: !include resourceTypes/app-person.raml
|
|
44
|
+
Product: !include resourceTypes/product.raml
|
|
45
|
+
ErrorResource:
|
|
46
|
+
description: A response that is errored
|
|
47
|
+
type: object
|
|
48
|
+
properties:
|
|
49
|
+
error:
|
|
50
|
+
type: boolean
|
|
51
|
+
required: true
|
|
52
|
+
example: true
|
|
53
|
+
default: true
|
|
54
|
+
description: Indicate that the response is errored.
|
|
55
|
+
message:
|
|
56
|
+
type: string
|
|
57
|
+
description: The error message associated with the error.
|
|
58
|
+
required: true
|
|
59
|
+
Feature:
|
|
60
|
+
description: A feature to test enum values in the URI parameters.
|
|
61
|
+
type: string
|
|
62
|
+
enum:
|
|
63
|
+
- A
|
|
64
|
+
- B
|
|
65
|
+
- C
|
|
66
|
+
|
|
67
|
+
resourceTypes:
|
|
68
|
+
ResourceNotFound:
|
|
69
|
+
get:
|
|
70
|
+
responses:
|
|
71
|
+
404:
|
|
72
|
+
body:
|
|
73
|
+
application/json:
|
|
74
|
+
displayName: Not found response
|
|
75
|
+
type: ErrorResource
|
|
76
|
+
application/xml:
|
|
77
|
+
displayName: Not found response
|
|
78
|
+
type: !include schemas/error-response.xsd
|
|
79
|
+
example: !include examples/e404.xml
|
|
80
|
+
UnauthorizedResponse:
|
|
81
|
+
get:
|
|
82
|
+
responses:
|
|
83
|
+
404:
|
|
84
|
+
body:
|
|
85
|
+
application/json:
|
|
86
|
+
displayName: Unauthorized response
|
|
87
|
+
type: ErrorResource
|
|
88
|
+
application/xml:
|
|
89
|
+
displayName: Unauthorized response
|
|
90
|
+
type: !include schemas/error-response.xsd
|
|
91
|
+
example: !include examples/e401.xml
|
|
92
|
+
RequestErrorResponse:
|
|
93
|
+
get:
|
|
94
|
+
responses:
|
|
95
|
+
400:
|
|
96
|
+
description: The error response when one of the parameters is invalid and can't be parsed. Nothing can be done at the time except correcting the request to send valid data.
|
|
97
|
+
body:
|
|
98
|
+
application/json:
|
|
99
|
+
displayName: Invalid request
|
|
100
|
+
type: ErrorResource
|
|
101
|
+
application/xml:
|
|
102
|
+
displayName: Invalid request
|
|
103
|
+
type: !include schemas/error-response.xsd
|
|
104
|
+
example: !include examples/e400.xml
|
|
105
|
+
traits:
|
|
106
|
+
Paginated: !include traits/pagination.raml
|
|
107
|
+
Adminable: !include traits/adminable.raml
|
|
108
|
+
RateLimited: !include traits/rate-limited.raml
|
|
109
|
+
securitySchemes:
|
|
110
|
+
oauth_2_0: !include securitySchemes/oauth_2_0.raml
|
|
111
|
+
x-custom: !include securitySchemes/x-custom.raml
|
|
112
|
+
basic: !include securitySchemes/basic.raml
|
|
113
|
+
|
|
114
|
+
documentation:
|
|
115
|
+
- title: Test doc
|
|
116
|
+
content: Test content
|
|
117
|
+
|
|
118
|
+
securedBy: [basic]
|
|
119
|
+
|
|
120
|
+
/test-parameters/{feature}:
|
|
121
|
+
(deprecated): This endpoint is deprecated and will be removed.
|
|
122
|
+
securedBy: [myLib.oauthLib]
|
|
123
|
+
uriParameters:
|
|
124
|
+
feature:
|
|
125
|
+
type: string
|
|
126
|
+
enum:
|
|
127
|
+
- A
|
|
128
|
+
- B
|
|
129
|
+
- C
|
|
130
|
+
get:
|
|
131
|
+
(deprecated): This method is deprecated and will be removed.
|
|
132
|
+
(clearanceLevel):
|
|
133
|
+
level: high
|
|
134
|
+
signature: 230-ghtwvfrs1itr
|
|
135
|
+
description: To test enum values in the URI parameters for inline type declaration.
|
|
136
|
+
queryParameters:
|
|
137
|
+
testRepeatable:
|
|
138
|
+
(deprecated): Test parameter will be removed in next version of the API.
|
|
139
|
+
required: true
|
|
140
|
+
type: string[]
|
|
141
|
+
example: [value1, value2]
|
|
142
|
+
numericRepeatable:
|
|
143
|
+
required: true
|
|
144
|
+
type: integer[]
|
|
145
|
+
examples:
|
|
146
|
+
Some-test-example: [123, 456]
|
|
147
|
+
Other-example: [1011, 1213]
|
|
148
|
+
notRequiredRepeatable:
|
|
149
|
+
(annotationTest):
|
|
150
|
+
type: array
|
|
151
|
+
items: date-only
|
|
152
|
+
required: false
|
|
153
|
+
/{typeFeature}:
|
|
154
|
+
(annotationTest):
|
|
155
|
+
(deprecated): This method will be removed in future release of the API.
|
|
156
|
+
uriParameters:
|
|
157
|
+
typeFeature:
|
|
158
|
+
(annotationTest):
|
|
159
|
+
type: Feature
|
|
160
|
+
get:
|
|
161
|
+
(deprecated): This endpoint is deprecated and will be removed.
|
|
162
|
+
description: To test enum values in the URI parameters for global type declaration.
|
|
163
|
+
/people:
|
|
164
|
+
displayName: People
|
|
165
|
+
type: RequestErrorResponse
|
|
166
|
+
is: [RateLimited]
|
|
167
|
+
get:
|
|
168
|
+
(annotationTest):
|
|
169
|
+
displayName: List people
|
|
170
|
+
description: Use this method to list all the people.
|
|
171
|
+
is: [Paginated: {resourceType: AppPerson}]
|
|
172
|
+
headers:
|
|
173
|
+
x-people-op-id:
|
|
174
|
+
(annotationTest):
|
|
175
|
+
type: string
|
|
176
|
+
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
|
|
177
|
+
description: People ops ID. It is UUID v4 string
|
|
178
|
+
example: 9719fa6f-c666-48e0-a191-290890760b30
|
|
179
|
+
post:
|
|
180
|
+
(deprecated): |
|
|
181
|
+
This method is not deprecated. And this is only an annotation test.
|
|
182
|
+
displayName: Create a person
|
|
183
|
+
description: Use this method to add new person
|
|
184
|
+
body:
|
|
185
|
+
application/json:
|
|
186
|
+
(deprecated): This response type is deprecated and soon will be replaced.
|
|
187
|
+
type: AppPerson
|
|
188
|
+
application/xml:
|
|
189
|
+
type: !include schemas/person.xsd
|
|
190
|
+
example: !include examples/person.xml
|
|
191
|
+
put:
|
|
192
|
+
displayName: Update a person
|
|
193
|
+
description: Updates the person in the datastore.
|
|
194
|
+
body:
|
|
195
|
+
application/json:
|
|
196
|
+
schema: !include schemas/person.json
|
|
197
|
+
example: !include examples/person.json
|
|
198
|
+
application/xml:
|
|
199
|
+
type: !include schemas/person.xsd
|
|
200
|
+
example: !include examples/person.xml
|
|
201
|
+
responses:
|
|
202
|
+
200:
|
|
203
|
+
(deprecated): This response type is deprecated and soon will be replaced.
|
|
204
|
+
description: |
|
|
205
|
+
Success response for the body
|
|
206
|
+
headers:
|
|
207
|
+
X-Frame-Options:
|
|
208
|
+
type: string
|
|
209
|
+
examples:
|
|
210
|
+
Deny: DENY
|
|
211
|
+
SameOrigin: SAMEORIGIN
|
|
212
|
+
body:
|
|
213
|
+
application/json:
|
|
214
|
+
schema: !include schemas/person.json
|
|
215
|
+
example: !include examples/person.json
|
|
216
|
+
application/xml:
|
|
217
|
+
type: !include schemas/person.xsd
|
|
218
|
+
example: !include examples/person.xml
|
|
219
|
+
/{personId}:
|
|
220
|
+
securedBy: x-custom
|
|
221
|
+
type: ResourceNotFound
|
|
222
|
+
displayName: A person
|
|
223
|
+
description: The endpoint to access information about the person
|
|
224
|
+
uriParameters:
|
|
225
|
+
personId:
|
|
226
|
+
type: integer
|
|
227
|
+
required: true
|
|
228
|
+
description: The ID of the person in the system. It is generated by the database numeric value for the person.
|
|
229
|
+
example: 1234
|
|
230
|
+
get:
|
|
231
|
+
displayName: Get a person
|
|
232
|
+
description: Returns a person
|
|
233
|
+
headers:
|
|
234
|
+
x-client-id:
|
|
235
|
+
(deprecated): This will be replaced
|
|
236
|
+
example: 123456-acme.client.com
|
|
237
|
+
description: The application id used to make a request. It can be obtained in the developer console.
|
|
238
|
+
type: string
|
|
239
|
+
required: true
|
|
240
|
+
x-people-op-id:
|
|
241
|
+
(annotationTest):
|
|
242
|
+
type: string
|
|
243
|
+
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
|
|
244
|
+
description: People ops ID. It is UUID v4 string
|
|
245
|
+
example: 9719fa6f-c666-48e0-a191-290890760b30
|
|
246
|
+
responses:
|
|
247
|
+
200:
|
|
248
|
+
body:
|
|
249
|
+
application/json:
|
|
250
|
+
type: AppPerson
|
|
251
|
+
application/xml:
|
|
252
|
+
type: !include schemas/person.xsd
|
|
253
|
+
example: !include examples/person.xml
|
|
254
|
+
delete:
|
|
255
|
+
displayName: Remove a person
|
|
256
|
+
description: Removes the person from the datastore. This method do not returns any data in 200 response.
|
|
257
|
+
responses:
|
|
258
|
+
204:
|
|
259
|
+
headers:
|
|
260
|
+
x-people-op-id:
|
|
261
|
+
(annotationTest):
|
|
262
|
+
type: string
|
|
263
|
+
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
|
|
264
|
+
description: People ops ID. It is UUID v4 string
|
|
265
|
+
example: 9719fa6f-c666-48e0-a191-290890760b30
|
|
266
|
+
put:
|
|
267
|
+
displayName: Update a person
|
|
268
|
+
description: Updates the person in the datastore.
|
|
269
|
+
queryParameters:
|
|
270
|
+
testPatam: string
|
|
271
|
+
body:
|
|
272
|
+
application/json:
|
|
273
|
+
type: AppPerson
|
|
274
|
+
application/xml:
|
|
275
|
+
type: !include schemas/person.xsd
|
|
276
|
+
example: !include examples/person.xml
|
|
277
|
+
responses:
|
|
278
|
+
200:
|
|
279
|
+
headers:
|
|
280
|
+
x-people-op-id:
|
|
281
|
+
(annotationTest):
|
|
282
|
+
type: string
|
|
283
|
+
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
|
|
284
|
+
description: People ops ID. It is UUID v4 string
|
|
285
|
+
example: 9719fa6f-c666-48e0-a191-290890760b30
|
|
286
|
+
/products:
|
|
287
|
+
displayName: Products
|
|
288
|
+
description: The API is to be used to access data about the products.
|
|
289
|
+
type: RequestErrorResponse
|
|
290
|
+
post:
|
|
291
|
+
displayName: Create product
|
|
292
|
+
description: |
|
|
293
|
+
Creates a product in the store.
|
|
294
|
+
While creating a product the `id` and `etag` properties will be ignored.
|
|
295
|
+
|
|
296
|
+
The endpoint will reject the request if exactly the same product is already defined in the
|
|
297
|
+
datastore (all properties of both objects equals). Newly created product is available
|
|
298
|
+
for listing but **it won't be available for ordering API** until it's availability is not set.
|
|
299
|
+
body:
|
|
300
|
+
application/json:
|
|
301
|
+
type: Product
|
|
302
|
+
application/xml:
|
|
303
|
+
type: !include schemas/product.xsd
|
|
304
|
+
example: !include examples/product.xml
|
|
305
|
+
responses:
|
|
306
|
+
200:
|
|
307
|
+
body:
|
|
308
|
+
application/json:
|
|
309
|
+
type: Product
|
|
310
|
+
examples:
|
|
311
|
+
Product:
|
|
312
|
+
id: d697f5cea85011e680f576304dec7eb7
|
|
313
|
+
name: Super product
|
|
314
|
+
quantity: 125
|
|
315
|
+
unit: ml
|
|
316
|
+
upc: "123456789101"
|
|
317
|
+
available: true
|
|
318
|
+
etag: "W/\"686897696a7c876b7e\""
|
|
319
|
+
OtherProduct:
|
|
320
|
+
id: 123e4567e89b12d3a456426655440000
|
|
321
|
+
name: Acme Product
|
|
322
|
+
quantity: 1
|
|
323
|
+
unit: kg
|
|
324
|
+
upc: "223456789101"
|
|
325
|
+
available: true
|
|
326
|
+
etag: "W/\"123456789\""
|
|
327
|
+
application/xml:
|
|
328
|
+
type: !include schemas/product.xsd
|
|
329
|
+
example: !include examples/product.xml
|
|
330
|
+
400:
|
|
331
|
+
description: The request has been rejected. Probably the product already exists in the datastore.
|
|
332
|
+
/orgs:
|
|
333
|
+
/{orgId}:
|
|
334
|
+
is: [RateLimited]
|
|
335
|
+
get:
|
|
336
|
+
displayName: Get organization
|
|
337
|
+
description: Returns an organization info.
|
|
338
|
+
responses:
|
|
339
|
+
200:
|
|
340
|
+
body:
|
|
341
|
+
application/json:
|
|
342
|
+
type: ExampleType.Org
|
|
343
|
+
properties:
|
|
344
|
+
id:
|
|
345
|
+
type: string
|
|
346
|
+
description: UUID generated ID
|
|
347
|
+
example:
|
|
348
|
+
id: "12345"
|
|
349
|
+
onCall:
|
|
350
|
+
firstname: nico
|
|
351
|
+
lastname: ark
|
|
352
|
+
kind: AcmeAdmin
|
|
353
|
+
clearanceLevel: low
|
|
354
|
+
phone: "12321"
|
|
355
|
+
Head:
|
|
356
|
+
firstname: nico
|
|
357
|
+
lastname: ark
|
|
358
|
+
kind: AcmeManager
|
|
359
|
+
reports:
|
|
360
|
+
-
|
|
361
|
+
firstname: nico
|
|
362
|
+
lastname: ark
|
|
363
|
+
kind: admin
|
|
364
|
+
phone: "123-23"
|
|
365
|
+
put:
|
|
366
|
+
body:
|
|
367
|
+
application/json:
|
|
368
|
+
type: ExampleType.Org
|
|
369
|
+
properties:
|
|
370
|
+
id:
|
|
371
|
+
type: string
|
|
372
|
+
description: UUID generated ID
|
|
373
|
+
responses:
|
|
374
|
+
200:
|
|
375
|
+
body:
|
|
376
|
+
application/json:
|
|
377
|
+
type: ExampleType.Org
|
|
378
|
+
/managers:
|
|
379
|
+
get:
|
|
380
|
+
responses:
|
|
381
|
+
200:
|
|
382
|
+
body:
|
|
383
|
+
application/json:
|
|
384
|
+
type: ExampleType.Manager[]
|
|
385
|
+
/messages:
|
|
386
|
+
securedBy: [oauth_2_0]
|
|
387
|
+
post:
|
|
388
|
+
description: Create a new message
|
|
389
|
+
is: [Adminable]
|
|
390
|
+
body:
|
|
391
|
+
application/json:
|
|
392
|
+
type: object
|
|
393
|
+
properties:
|
|
394
|
+
receiver:
|
|
395
|
+
type: string
|
|
396
|
+
description: receiver of the message
|
|
397
|
+
required: true
|
|
398
|
+
body:
|
|
399
|
+
type: string
|
|
400
|
+
description: A message body
|
|
401
|
+
required: true
|
|
402
|
+
important:
|
|
403
|
+
type: boolean
|
|
404
|
+
description: If true then the message will be marked as important
|
|
405
|
+
default: false
|
|
406
|
+
required: true
|
|
407
|
+
get:
|
|
408
|
+
description: |
|
|
409
|
+
List user messages. It returns an array of messages for last of 7 days if
|
|
410
|
+
`since` property is not set.
|
|
411
|
+
You can use `since` and `until` query parameters to control messages time
|
|
412
|
+
span.
|
|
413
|
+
queryParameters:
|
|
414
|
+
until:
|
|
415
|
+
(annotationTest):
|
|
416
|
+
type: date-only
|
|
417
|
+
description: Date right limit of the messages query.
|
|
418
|
+
example: 2017-05-12
|
|
419
|
+
since:
|
|
420
|
+
type: date-only
|
|
421
|
+
description: Date left limit of the messages query.
|
|
422
|
+
example: 2017-05-10
|
|
423
|
+
responses:
|
|
424
|
+
200:
|
|
425
|
+
body:
|
|
426
|
+
application/json:
|
|
427
|
+
type: array
|
|
428
|
+
items: !include resourceTypes/message-type.raml
|
|
429
|
+
example: !include examples/messages-example.json
|
|
430
|
+
/bulk:
|
|
431
|
+
post:
|
|
432
|
+
description: Bulk create messages.
|
|
433
|
+
is: [Adminable]
|
|
434
|
+
body:
|
|
435
|
+
application/json:
|
|
436
|
+
(annotationTest):
|
|
437
|
+
type: array
|
|
438
|
+
items: !include resourceTypes/message-sent-type.raml
|
|
439
|
+
examples:
|
|
440
|
+
Example1: !include examples/messages-sent-example.json
|
|
441
|
+
/arrayBody:
|
|
442
|
+
post:
|
|
443
|
+
body:
|
|
444
|
+
application/json:
|
|
445
|
+
(deprecated): This response type is deprecated and soon will be replaced.
|
|
446
|
+
description: |
|
|
447
|
+
This demonstrates a body as an Array
|
|
448
|
+
type: AppPerson[]
|
|
449
|
+
/multipleTypeInheritance:
|
|
450
|
+
get:
|
|
451
|
+
description: |
|
|
452
|
+
The response body inherits the following types:
|
|
453
|
+
|
|
454
|
+
- AppPerson
|
|
455
|
+
- AlertableAdmin
|
|
456
|
+
responses:
|
|
457
|
+
200:
|
|
458
|
+
body:
|
|
459
|
+
application/json:
|
|
460
|
+
type:
|
|
461
|
+
- AppPerson
|
|
462
|
+
- ExampleType.AlertableAdmin
|
|
463
|
+
/typeFromLibraryEndpoint:
|
|
464
|
+
post:
|
|
465
|
+
body:
|
|
466
|
+
type: myLib.TypeFromLibray
|
|
467
|
+
responses:
|
|
468
|
+
200:
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"from": {
|
|
4
|
+
"uid": "a7917e3c-4abf-11e7-a919-92ebcb67fe33",
|
|
5
|
+
"name": "Pawel Psztyc",
|
|
6
|
+
"email": "bea3d5e8-4abf-11e7-a919-92ebcb67fe33-em-vbc@domain.com"
|
|
7
|
+
},
|
|
8
|
+
"message": "This is an example message. Hello.",
|
|
9
|
+
"timestamp": 1496757380,
|
|
10
|
+
"attachements": [
|
|
11
|
+
"https://attc.domain.com/01332c24-4ac0-11e7-a919-92ebcb67fe33"
|
|
12
|
+
]
|
|
13
|
+
}, {
|
|
14
|
+
"from": {
|
|
15
|
+
"uid": "15e64d90-4ac0-11e7-a919-92ebcb67fe33",
|
|
16
|
+
"name": "John Doe",
|
|
17
|
+
"email": "220ce9bc-4abf-11e7-a919-92ebcb67fe33-oa-vbc@domain.com"
|
|
18
|
+
},
|
|
19
|
+
"message": "Howdy?",
|
|
20
|
+
"timestamp": 1496757498
|
|
21
|
+
}
|
|
22
|
+
]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"email": "bea3d5e8-4abf-11e7-a919-92ebcb67fe33-em-vbc@domain.com",
|
|
4
|
+
"message": "This is an example message. Hello.",
|
|
5
|
+
"timestamp": 1496757380,
|
|
6
|
+
"attachements": [
|
|
7
|
+
"https://attc.domain.com/01332c24-4ac0-11e7-a919-92ebcb67fe33"
|
|
8
|
+
]
|
|
9
|
+
}, {
|
|
10
|
+
"email": "220ce9bc-4abf-11e7-a919-92ebcb67fe33-oa-vbc@domain.com",
|
|
11
|
+
"message": "Howdy?",
|
|
12
|
+
"timestamp": 1496757498,
|
|
13
|
+
"important": true
|
|
14
|
+
}
|
|
15
|
+
]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "R34fg663H9KW9MMSKISI",
|
|
3
|
+
"name": "Pawel Psztyc",
|
|
4
|
+
"birthday": "1983-10-20",
|
|
5
|
+
"gender": "male",
|
|
6
|
+
"url": "https://domain.com/profile/pawel.psztyc",
|
|
7
|
+
"image": {
|
|
8
|
+
"url": "https://domain.com/profile/pawel.psztyc/image",
|
|
9
|
+
"thumb": "https://domain.com/profile/pawel.psztyc/image/thumb"
|
|
10
|
+
},
|
|
11
|
+
"tagline": "Some text about me.",
|
|
12
|
+
"language": "en_GB",
|
|
13
|
+
"etag": "W\\244m4n5kj3gbn2nj4k4n4"
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
id=R34fg663H9KW9MMSKISI&name=Pawel%20Psztyc&birthday=1983-10-20&gender=male&url=https%3A%2F%2Fdomain.com%2Fprofile%2Fpawel.psztyc&tagline=Some%20text%20about%20me.&language=en_GB&etag=W\244m4n5kj3gbn2nj4k4n4
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<resource error="false" type="AppPerson">
|
|
3
|
+
<id>Qawer63J73HJ6khjswuqyq62382jG21s</id>
|
|
4
|
+
<name>John Smith</name>
|
|
5
|
+
<birthday>1990-10-12</birthday>
|
|
6
|
+
<gender>male</gender>
|
|
7
|
+
<url>https://www.domain.com/people/Qawer63J73HJ6khjswuqyq62382jG21s</url>
|
|
8
|
+
<image>
|
|
9
|
+
<url>https://www.domain.com/people/Qawer63J73HJ6khjswuqyq62382jG21s/image</url>
|
|
10
|
+
<thumb>https://www.domain.com/people/Qawer63J73HJ6khjswuqyq62382jG21s/image/thumb</thumb>
|
|
11
|
+
</image>
|
|
12
|
+
<tagline>Hi, I'm John!</tagline>
|
|
13
|
+
<language>en_US</language>
|
|
14
|
+
</resource>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<resource error="false" type="Product">
|
|
3
|
+
<id>f2f7933a-a9ce-11e6-80f5-76304dec7eb7</id>
|
|
4
|
+
<name>Acme product - mentol flavor, 500 ml.</name>
|
|
5
|
+
<quantity>500</quantity>
|
|
6
|
+
<unit>ml</unit>
|
|
7
|
+
<upc>042100005264</upc>
|
|
8
|
+
<available>true</available>
|
|
9
|
+
</resource>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#%RAML 1.0 Library
|
|
2
|
+
usage: This is a Library raml
|
|
3
|
+
|
|
4
|
+
types:
|
|
5
|
+
TypeFromLibray:
|
|
6
|
+
properties:
|
|
7
|
+
age: number
|
|
8
|
+
securitySchemes:
|
|
9
|
+
oauthLib:
|
|
10
|
+
type: OAuth 2.0
|
|
11
|
+
describedBy:
|
|
12
|
+
queryParameters:
|
|
13
|
+
access_token:
|
|
14
|
+
type: string
|
|
15
|
+
description: Used to send a valid OAuth 2 access token. Do not use with the "Authorization" header.
|
|
16
|
+
required: false
|
|
17
|
+
headers:
|
|
18
|
+
authorization:
|
|
19
|
+
type: string
|
|
20
|
+
example: ya.2453vfDb3cJHisdf.*&H
|
|
21
|
+
description: Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter.
|
|
22
|
+
required: false
|
|
23
|
+
responses:
|
|
24
|
+
401:
|
|
25
|
+
description: Bad or expired token. This can happen if the user or Dropbox revoked or expired an access token. To fix, re-authenticate the user.
|
|
26
|
+
body:
|
|
27
|
+
application/json:
|
|
28
|
+
403:
|
|
29
|
+
description: Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...). Unfortunately, re-authenticating the user won't help here.
|
|
30
|
+
body:
|
|
31
|
+
application/json:
|
|
32
|
+
settings:
|
|
33
|
+
accessTokenUri: http://api.domain.com/oauth2/token
|
|
34
|
+
authorizationUri: http://api.domain.com/oauth2/auth
|
|
35
|
+
authorizationGrants: ["authorization_code", "implicit"]
|
|
36
|
+
scopes: ["profile", "email"]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#%RAML 1.0 DataType
|
|
2
|
+
|
|
3
|
+
displayName: A person resource
|
|
4
|
+
description: |
|
|
5
|
+
An object representing a person in the API.
|
|
6
|
+
This object will be used in all methods returning a Person or list of people.
|
|
7
|
+
|
|
8
|
+
type: !include resource.raml
|
|
9
|
+
example:
|
|
10
|
+
id: "R34fg663H9KW9MMSKISI"
|
|
11
|
+
name: "Pawel Psztyc"
|
|
12
|
+
birthday: "1983-10-20"
|
|
13
|
+
gender: male
|
|
14
|
+
url: "https://domain.com/profile/pawel.psztyc"
|
|
15
|
+
image:
|
|
16
|
+
url: https://domain.com/profile/pawel.psztyc/image
|
|
17
|
+
thumb: https://domain.com/profile/pawel.psztyc/image/thumb
|
|
18
|
+
tagline: Some text about me.
|
|
19
|
+
language: en_GB
|
|
20
|
+
etag: "W\\244m4n5kj3gbn2nj4k4n4"
|
|
21
|
+
properties:
|
|
22
|
+
id:
|
|
23
|
+
description: A unique identifier for a person. It is a 32 bit string containing alphanumeric characters.
|
|
24
|
+
name:
|
|
25
|
+
required: true
|
|
26
|
+
example: John Smith
|
|
27
|
+
description: Person full name. The input will be rejected if this property is not set while creating new object.
|
|
28
|
+
type: string
|
|
29
|
+
pattern: "[0-9a-zA-Z ]+"
|
|
30
|
+
birthday:
|
|
31
|
+
type: string
|
|
32
|
+
description: The person's date of birth, represented as YYYY-MM-DD.
|
|
33
|
+
gender?:
|
|
34
|
+
type: string
|
|
35
|
+
description: |
|
|
36
|
+
The person's gender. Possible values includes, but are not limited to, the following values:
|
|
37
|
+
* "male" - Male gender.
|
|
38
|
+
* "female" - Female gender.
|
|
39
|
+
* "other" - Other.
|
|
40
|
+
url:
|
|
41
|
+
type: string
|
|
42
|
+
description: The URL of this person's profile.
|
|
43
|
+
image: !include image.raml
|
|
44
|
+
tagline:
|
|
45
|
+
type: string
|
|
46
|
+
description: The brief description (tagline) of this person.
|
|
47
|
+
language:
|
|
48
|
+
type: string
|
|
49
|
+
description: The user's preferred language for rendering.
|