-
-
Notifications
You must be signed in to change notification settings - Fork 177
/
pact_broker_oas.yaml
215 lines (209 loc) · 5.58 KB
/
pact_broker_oas.yaml
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
openapi: 3.0.0
info:
version: "2"
title: Pact Broker API
description: The API for the Pact Broker application
paths:
/contracts/publish:
post:
description: "Publish consumer contracts with branch, tags and build URL"
requestBody:
required: true
description: The consumer contracts, branch, tags and build URL
content:
application/json:
schema:
type: object
properties:
pacticipantName:
type: string
minLength: 1
pacticipantVersionNumber:
type: string
minLength: 1
tags:
type: array
nullable: true
items:
type: string
branch:
type: string
nullable: true
buildUrl:
type: string
nullable: true
contracts:
type: array
items:
$ref: '#/components/schemas/ConsumerContractToPublish'
required:
- pacticipantName
- pacticipantVersionNumber
- contracts
responses:
"200":
description: OK
content:
application/hal+json:
schema:
type: object
required:
- notices
properties:
notices:
type: array
items:
$ref: '#/components/schemas/Notice'
"400":
description: Validation errror
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemJson'
application/hal+json:
schema:
type: object
properties:
notices:
type: array
items:
$ref: '#/components/schemas/Notice'
"409":
description: Conflict
content:
# application/problem+json:
# schema:
# $ref: '#/components/schemas/ProblemJson'
application/json:
schema:
$ref: '#/components/schemas/PublishConsumerContractConflictResponse'
components:
parameters:
PageSize:
name: page_size
in: query
description: The number of results to return per page
schema:
type: number
PageNumber:
name: page_number
in: query
description: The number of the page to return
schema:
type: number
schemas:
Notice:
type: object
required:
- type
- text
properties:
type:
type: string
enum:
- info
- debug
- warning
- prompt
- success
- error
text:
type: string
EmbeddedLink:
type: object
required:
- href
- title
properties:
href:
type: string
title:
type: string
name:
type: string
templated:
type: boolean
ConsumerContractToPublish:
type: object
properties:
consumerName:
type: string
minLength: 1
providerName:
type: string
minLength: 1
content:
type: string
minLength: 1
contentType:
enum:
- application/json
specification:
enum:
- pact
onConflict:
default: overwrite
enum:
- overwrite
- merge
required:
- consumerName
- providerName
- content
- contentType
- specification
PublishConsumerContractConflictResponse:
description: The custom response when there is a 409 Conflict
type: object
properties:
notices:
type: array
items:
$ref: '#/components/schemas/Notice'
required:
- notices
ProblemJson:
description: Problem response as per https://www.rfc-editor.org/rfc/rfc9457.html
type: object
properties:
code:
type: string
type:
type: string
title:
type: string
detail:
type: string
instance:
type: string
status:
type: integer
errors:
type: array
description: an array of error details to accompany a problem details response
items:
type: object
description: an error object to provide explicit details on a problem towards
an API consumer
properties:
detail:
type: string
description: a granular description on the specific error related to a body
property, query parameter, path parameters, and/or header
pointer:
type: string
description: a JSON Pointer to a specific request body property that is
the source of error
parameter:
type: string
description: the name of the query or path parameter that is the source
of error
header:
type: string
description: the name of the header that is the source of error
required:
- detail
required:
- type
- title
- status