-
Notifications
You must be signed in to change notification settings - Fork 0
/
common-raml-fragment.raml
43 lines (35 loc) · 2.08 KB
/
common-raml-fragment.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
#%RAML 1.0 Library
usage: Common RAML Fragments to standardise implementation of common aspects of RAML API Specifications.
traits:
# Error response
hasCommonApikitErrorResponses: !include traits/errors/apikit-error-response.raml
hasCommonInternalServerErrorResponses: !include traits/errors/internal-server-error-response.raml
# Common Headers
hasCommonHeaders: !include traits/headers/common-headers.raml
hasPageable: !include traits/queryParams/pageable.raml
hasSortable: !include traits/queryParams/sortable.raml
# Headers Policy
#There are 2 Rate Limited Traits here as they both specify a different success HTTP Code. Use as needed on the correct methods e.g. 200 for GET and 201 for POST.
hasRateLimitedHttp200: !include traits/headers/rate-limited-200.raml
hasRateLimitedHttp201: !include traits/headers/rate-limited-201.raml
# Requests
hasRequestJson: !include traits/requests/request-json.raml
hasRequestJsonWithExample: !include traits/requests/request-json-with-example.raml
hasRequestXml: !include traits/requests/request-xml.raml
hasRequestFormData: !include traits/requests/request-form-data.raml
# Responses
hasResponseJson200: !include traits/responses/response-json-200.raml
hasResponseJson201: !include traits/responses/response-json-201.raml
hasResponseJson202: !include traits/responses/response-json-202.raml
hasResponseJsonWithExample200: !include traits/responses/response-json-with-example-200.raml
hasResponseJsonWithExample201: !include traits/responses/response-json-with-example-201.raml
hasResponseJsonWithExample202: !include traits/responses/response-json-with-example-202.raml
hasResponse204: !include traits/responses/response-204.raml
hasResponseXml200: !include traits/responses/response-xml-200.raml
types:
errorType: !include datatypes/responses/errors/error-type.raml
uses:
resourceTypes: resourcetypes/generic-resourcetypes.raml
experienceResourceTypes: resourcetypes/experience-resourcetypes.raml
processResourceTypes: resourcetypes/process-resourcetypes.raml
systemResourceTypes: resourcetypes/system-resourcetypes.raml