-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yml
More file actions
258 lines (255 loc) · 7.07 KB
/
Copy pathopenapi.yml
File metadata and controls
258 lines (255 loc) · 7.07 KB
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
openapi: 3.0.0
info:
title: API Evangelist Standards API Evangelist Contracts
description: This is the technical contract for the API Evangelist contract API.
version: 0.1.0
contact:
name: Kin Lane
email: info@apievangelist.com
tags:
- name: Contracts
description: An agreement between API producer and consumers.
paths:
/contracts:
get:
operationId: getContracts
summary: API Evangelist Standards Get Contracts
description: Get all of the API contracts.
tags:
- Contracts
responses:
"200":
description: A successful request.
content:
application/json:
schema:
$ref: "#/components/schemas/Response"
examples:
Contracts:
$ref: "#/components/examples/Response"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"429":
$ref: "#/components/responses/TooManyRequests"
"500":
$ref: "#/components/responses/InternalServerError"
components:
examples:
Response:
summary: A successful response.
value:
meta:
search: API
limit: 100
page: 1
totalPages: 1
data:
- name: Contract One
description: The machine readable contract between the producers and consumer of these APIs.
tags:
- Contracts
parameters:
Organization:
name: search
description: The organization for the platform.
in: query
required: false
schema:
type: string
Search:
name: search
description: The keyword to search by.
in: query
required: false
schema:
type: string
Limit:
name: limit
description: The limit of the results.
in: query
required: false
schema:
type: string
Page:
name: page
description: The page of the results.
in: query
required: false
schema:
type: string
responses:
BadRequest:
description: Bad Request
content:
application/problem+json:
schema:
$ref: "#/components/schemas/Problem"
example:
type: https://example.com/errors/bad-request
title: Bad Request
status: 400
detail: The request is invalid or missing required parameters.
Conflict:
description: Conflict
content:
application/problem+json:
schema:
$ref: "#/components/schemas/Problem"
example:
type: https://example.com/errors/conflict
title: Conflict
status: 409
detail: There is a conflict with an existing resource.
Forbidden:
description: Forbidden
content:
application/problem+json:
schema:
$ref: "#/components/schemas/Problem"
example:
type: https://example.com/errors/forbidden
title: Forbidden
status: 403
detail: Access is forbidden with the provided credentials.
InternalServerError:
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: "#/components/schemas/Problem"
example:
type: https://example.com/errors/internal-server-error
title: Internal Server Error
status: 500
detail: An unexpected error occurred.
NotFound:
description: Not Found
content:
application/problem+json:
schema:
$ref: "#/components/schemas/Problem"
example:
type: https://example.com/errors/not-found
title: Not Found
status: 404
detail: The requested resource was not found.
TooManyRequests:
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: "#/components/schemas/Problem"
example:
type: https://example.com/errors/too-many-requests
title: Too Many Requests
status: 429
detail: You have exceeded the rate limit.
Unauthorized:
description: Unauthorized
content:
application/problem+json:
schema:
$ref: "#/components/schemas/Problem"
example:
type: https://example.com/errors/unauthorized
title: Unauthorized
status: 401
detail: You do not have the necessary permissions.
securitySchemes:
api_key:
type: apiKey
name: x-api-key
in: header
schemas:
Response:
type: object
description: An JSON API object with metadata, data, and links.
properties:
meta:
$ref: "#/components/schemas/Meta"
data:
$ref: "#/components/schemas/Contracts"
required:
- meta
- data
Meta:
type: object
properties:
search:
type: string
type:
type: string
limit:
type: integer
page:
type: integer
totalPages:
type: integer
required:
- totalPages
- page
- limit
Link:
type: object
properties:
self:
type: string
first:
type: string
prev:
type: string
next:
type: string
last:
type: string
required:
- self
Contracts:
type: array
description: Listing of repositories pulled for and organization.
items:
$ref: "#/components/schemas/Contract"
Contract:
type: object
description: A single repository.
properties:
aid:
type: string
description: The unique API identifier of the contract.
name:
type: string
description: The name of the contract.
description:
type: string
description: The description of the contract.
Problem:
xml:
name: problem
namespace: urn:ietf:rfc:7807
properties:
type:
type: string
description: A URI reference that identifies the problem type
example: https://example.com/probs/out-of-credit
title:
type: string
description: A short, human-readable summary of the problem type
example: You do not have enough credit.
detail:
type: string
description: A human-readable explanation specific to this occurrence of the problem
example: Your current balance is 30, but that costs 50.
instance:
type: string
description: A URI reference that identifies the specific occurrence of the problem
example: /account/12345/msgs/abc
status:
type: integer
description: The HTTP status code
example: 400