-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.yml
145 lines (145 loc) · 3.45 KB
/
example.yml
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
version: "2021-05-07"
info:
title: Paypal API Guidelines
standards:
- name: error.json
level: may
iri: https://github.com/paypal/api-standards/blob/master/common-components/v1/schema/json/openapi-2.0/error.json
scenarios:
- when: [http, transaction]
then:
- subject: [http, request, method]
level: may
values:
- get
- post
- put
- delete
- patch
- subject: [http, request, header]
level: may
values:
- Accept
- Accept-Charset
- Content-Language
- Content-Type
- Link
- Prefer
- subject: [http, response, header]
level: may
values:
- Content-Language
- Content-Type
- Link
- Location
- Prefer
- subject: [http, request, header, Prefer]
level: may
values:
- respond-async
- read-consistent
- read-eventual-consistent
- read-cache
- return=representation
- return=minimal
- subject: [http, message, header, Content-Type]
level: should
values:
- application/json
- when: [http, request, method, get]
then:
- subject: [http, response, status_code]
level: may
values:
- "200"
- "400"
- "404"
- "422"
- "500"
- when: [http, request, method, post]
then:
- subject: [http, response, status_code]
level: may
values:
- "200"
- "201"
- "202"
- "400"
- "404"
- "422"
- "500"
- when: [http, request, method, put]
then:
- subject: [http, response, status_code]
level: may
values:
- "200"
- "202"
- "204"
- "400"
- "404"
- "422"
- "500"
- when: [http, request, method, patch]
then:
- subject: [http, response, status_code]
level: may
values:
- "200"
- "204"
- "400"
- "404"
- "422"
- "500"
- when: [http, request, method, delete]
then:
- subject: [http, response, status_code]
level: may
values:
- "200"
- "204"
- "400"
- "404"
- "422"
- "500"
- when: [http, response]
then:
- subject: [http, response, header]
require: must
values:
- "Content-Language"
- when: [http, message, body]
then:
- subject: [http, message, header]
level: must
values:
- Content-Type
- when: [http, response, status_code, "201"]
then:
- subject: [http, response, header]
level: must_not
values:
- Link
- Location
- when: [http, response, status_code, redirect]
then:
- subject: [http, response, header]
level: must_not
values:
- Link
- Location
- when: [http, response, status_code, client_error]
then:
- subject: [http, message, body]
level: must
follow: error.json
- when: [http, response, status_code, server_error]
then:
- subject: [http, response, body]
level: must
follow: error.json
- when: [http, response, status_code, success]
then:
- subject: [http, response, body]
level: must_not
follow: error.json