1
1
openapi : 3.0.0
2
- info :
2
+ info :
3
3
title : Link Example
4
4
version : 1.0.0
5
- paths :
6
- /2.0/users/{username} :
7
- get :
5
+ paths :
6
+ /2.0/users/{username} :
7
+ get :
8
8
operationId : getUserByName
9
- parameters :
9
+ parameters :
10
10
- name : username
11
11
in : path
12
12
required : true
13
13
schema :
14
14
type : string
15
- responses :
15
+ responses :
16
16
' 200 ' :
17
17
description : The User
18
18
content :
19
19
application/json :
20
- schema :
20
+ schema :
21
21
$ref : ' #/components/schemas/user'
22
22
links :
23
23
userRepositories :
34
34
responses :
35
35
' 200 ' :
36
36
description : repositories owned by the supplied user
37
- content :
37
+ content :
38
38
application/json :
39
39
schema :
40
40
type : array
@@ -43,10 +43,10 @@ paths:
43
43
links :
44
44
userRepository :
45
45
$ref : ' #/components/links/UserRepository'
46
- /2.0/repositories/{username}/{slug} :
47
- get :
46
+ /2.0/repositories/{username}/{slug} :
47
+ get :
48
48
operationId : getRepository
49
- parameters :
49
+ parameters :
50
50
- name : username
51
51
in : path
52
52
required : true
@@ -57,20 +57,20 @@ paths:
57
57
required : true
58
58
schema :
59
59
type : string
60
- responses :
60
+ responses :
61
61
' 200 ' :
62
62
description : The repository
63
63
content :
64
- application/json :
65
- schema :
64
+ application/json :
65
+ schema :
66
66
$ref : ' #/components/schemas/repository'
67
67
links :
68
68
repositoryPullRequests :
69
69
$ref : ' #/components/links/RepositoryPullRequests'
70
- /2.0/repositories/{username}/{slug}/pullrequests :
71
- get :
70
+ /2.0/repositories/{username}/{slug}/pullrequests :
71
+ get :
72
72
operationId : getPullRequestsByRepository
73
- parameters :
73
+ parameters :
74
74
- name : username
75
75
in : path
76
76
required : true
@@ -85,23 +85,23 @@ paths:
85
85
in : query
86
86
schema :
87
87
type : string
88
- enum :
88
+ enum :
89
89
- open
90
90
- merged
91
91
- declined
92
- responses :
92
+ responses :
93
93
' 200 ' :
94
94
description : an array of pull request objects
95
95
content :
96
- application/json :
97
- schema :
96
+ application/json :
97
+ schema :
98
98
type : array
99
- items :
99
+ items :
100
100
$ref : ' #/components/schemas/pullrequest'
101
- /2.0/repositories/{username}/{slug}/pullrequests/{pid} :
102
- get :
101
+ /2.0/repositories/{username}/{slug}/pullrequests/{pid} :
102
+ get :
103
103
operationId : getPullRequestsById
104
- parameters :
104
+ parameters :
105
105
- name : username
106
106
in : path
107
107
required : true
@@ -117,20 +117,20 @@ paths:
117
117
required : true
118
118
schema :
119
119
type : string
120
- responses :
120
+ responses :
121
121
' 200 ' :
122
122
description : a pull request object
123
123
content :
124
- application/json :
125
- schema :
124
+ application/json :
125
+ schema :
126
126
$ref : ' #/components/schemas/pullrequest'
127
127
links :
128
128
pullRequestMerge :
129
129
$ref : ' #/components/links/PullRequestMerge'
130
- /2.0/repositories/{username}/{slug}/pullrequests/{pid}/merge :
131
- post :
130
+ /2.0/repositories/{username}/{slug}/pullrequests/{pid}/merge :
131
+ post :
132
132
operationId : mergePullRequest
133
- parameters :
133
+ parameters :
134
134
- name : username
135
135
in : path
136
136
required : true
@@ -146,7 +146,7 @@ paths:
146
146
required : true
147
147
schema :
148
148
type : string
149
- responses :
149
+ responses :
150
150
' 204 ' :
151
151
description : the PR was successfully merged
152
152
components :
@@ -165,7 +165,7 @@ components:
165
165
RepositoryPullRequests :
166
166
# returns '#/components/schemas/pullrequest'
167
167
operationId : getPullRequestsByRepository
168
- parameters :
168
+ parameters :
169
169
username : $response.body#/owner/username
170
170
slug : $response.body#/slug
171
171
PullRequestMerge :
@@ -175,29 +175,29 @@ components:
175
175
username : $response.body#/author/username
176
176
slug : $response.body#/repository/slug
177
177
pid : $response.body#/id
178
- schemas :
179
- user :
178
+ schemas :
179
+ user :
180
180
type : object
181
- properties :
182
- username :
181
+ properties :
182
+ username :
183
183
type : string
184
- uuid :
184
+ uuid :
185
185
type : string
186
- repository :
186
+ repository :
187
187
type : object
188
- properties :
189
- slug :
188
+ properties :
189
+ slug :
190
190
type : string
191
- owner :
191
+ owner :
192
192
$ref : ' #/components/schemas/user'
193
- pullrequest :
193
+ pullrequest :
194
194
type : object
195
- properties :
196
- id :
195
+ properties :
196
+ id :
197
197
type : integer
198
- title :
198
+ title :
199
199
type : string
200
- repository :
200
+ repository :
201
201
$ref : ' #/components/schemas/repository'
202
- author :
202
+ author :
203
203
$ref : ' #/components/schemas/user'
0 commit comments