pact_broker-client 1.77.0 → 1.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2799 @@
1
+ ### A pact between Pact Broker Client V2 and Pact Broker
2
+
3
+ #### Requests from Pact Broker Client V2 to Pact Broker
4
+
5
+ * [A request for a pacticipant version](#a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_2_environments_that_aren't_test_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with 2 environments that aren't test available for deployment
6
+
7
+ * [A request for a pacticipant version](#a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment
8
+
9
+ * [A request for a pacticipant version](#a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_release) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for release
10
+
11
+ * [A request for an environment](#a_request_for_an_environment_given_an_environment_with_name_test_and_UUID_16926ef3-590f-4e3f-838e-719717aa88c9_exists) given an environment with name test and UUID 16926ef3-590f-4e3f-838e-719717aa88c9 exists
12
+
13
+ * [A request for the compatibility matrix for a pacticipant that does not exist](#a_request_for_the_compatibility_matrix_for_a_pacticipant_that_does_not_exist)
14
+
15
+ * [A request for the compatibility matrix for all versions of Foo and Bar](#a_request_for_the_compatibility_matrix_for_all_versions_of_Foo_and_Bar_given_the_pact_for_Foo_version_1.2.3_and_1.2.4_has_been_verified_by_Bar_version_4.5.6) given the pact for Foo version 1.2.3 and 1.2.4 has been verified by Bar version 4.5.6
16
+
17
+ * [A request for the compatibility matrix for Foo version 1.2.3 and Bar version 4.5.6](#a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_Bar_version_4.5.6_given_the_pact_for_Foo_Thing_version_1.2.3_has_been_verified_by_Bar_version_4.5.6) given the pact for Foo Thing version 1.2.3 has been verified by Bar version 4.5.6
18
+
19
+ * [A request for the compatibility matrix for Foo version 1.2.3 and Bar version 4.5.6](#a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_Bar_version_4.5.6_given_the_pact_for_Foo_version_1.2.3_has_been_verified_by_Bar_version_4.5.6) given the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6
20
+
21
+ * [A request for the compatibility matrix for Foo version 1.2.3 and the latest prod version of Bar](#a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_the_latest_prod_version_of_Bar_given_the_pact_for_Foo_version_1.2.3_has_been_successfully_verified_by_Bar_version_4.5.6_with_tag_prod,_and_1.2.4_unsuccessfully_by_9.9.9) given the pact for Foo version 1.2.3 has been successfully verified by Bar version 4.5.6 with tag prod, and 1.2.4 unsuccessfully by 9.9.9
22
+
23
+ * [A request for the compatibility matrix for Foo version 1.2.3 and the latest prod versions of all other pacticipants](#a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_the_latest_prod_versions_of_all_other_pacticipants_given_the_pact_for_Foo_version_1.2.3_has_been_successfully_verified_by_Bar_version_4.5.6_(tagged_prod)_and_version_5.6.7) given the pact for Foo version 1.2.3 has been successfully verified by Bar version 4.5.6 (tagged prod) and version 5.6.7
24
+
25
+ * [A request for the compatibility matrix for Foo version 1.2.3 and the latest version of Bar](#a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_the_latest_version_of_Bar_given_the_pact_for_Foo_version_1.2.3_has_been_successfully_verified_by_Bar_version_4.5.6,_and_1.2.4_unsuccessfully_by_9.9.9) given the pact for Foo version 1.2.3 has been successfully verified by Bar version 4.5.6, and 1.2.4 unsuccessfully by 9.9.9
26
+
27
+ * [A request for the compatibility matrix where one or more versions does not exist](#a_request_for_the_compatibility_matrix_where_one_or_more_versions_does_not_exist_given_the_pact_for_Foo_version_1.2.3_has_been_verified_by_Bar_version_4.5.6) given the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6
28
+
29
+ * [A request for the compatibility matrix where only the version of Foo is specified](#a_request_for_the_compatibility_matrix_where_only_the_version_of_Foo_is_specified_given_the_pact_for_Foo_version_1.2.3_has_been_verified_by_Bar_version_4.5.6_and_version_5.6.7) given the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6 and version 5.6.7
30
+
31
+ * [A request for the environments](#a_request_for_the_environments_given_an_environment_with_name_test_exists) given an environment with name test exists
32
+
33
+ * [A request for the index resource](#a_request_for_the_index_resource)
34
+
35
+ * [A request for the index resource](#a_request_for_the_index_resource_given_the_pacticipant_relations_are_present) given the pacticipant relations are present
36
+
37
+ * [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:environments_relation_exists_in_the_index_resource) given the pb:environments relation exists in the index resource
38
+
39
+ * [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:latest-tagged-version_relation_exists_in_the_index_resource) given the pb:latest-tagged-version relation exists in the index resource
40
+
41
+ * [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:latest-version_relation_exists_in_the_index_resource) given the pb:latest-version relation exists in the index resource
42
+
43
+ * [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:pacticipant-branch_relation_exists_in_the_index_resource) given the pb:pacticipant-branch relation exists in the index resource
44
+
45
+ * [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:pacticipant-version_and_pb:environments_relations_exist_in_the_index_resource) given the pb:pacticipant-version and pb:environments relations exist in the index resource
46
+
47
+ * [A request for the index resource](#a_request_for_the_index_resource_given_the_pb:publish-contracts_relations_exists_in_the_index_resource) given the pb:publish-contracts relations exists in the index resource
48
+
49
+ * [A request for the index resource with the webhook relation](#a_request_for_the_index_resource_with_the_webhook_relation)
50
+
51
+ * [A request for the list of the latest pacts from all consumers for the Pricing Service'](#a_request_for_the_list_of_the_latest_pacts_from_all_consumers_for_the_Pricing_Service'_given_a_latest_pact_between_Condor_and_the_Pricing_Service_exists) given a latest pact between Condor and the Pricing Service exists
52
+
53
+ * [A request for the list of the latest prod pacts from all consumers for the Pricing Service'](#a_request_for_the_list_of_the_latest_prod_pacts_from_all_consumers_for_the_Pricing_Service'_given_tagged_as_prod_pact_between_Condor_and_the_Pricing_Service_exists) given tagged as prod pact between Condor and the Pricing Service exists
54
+
55
+ * [A request for the successful rows of the compatibility matrix for all versions of Foo and Bar](#a_request_for_the_successful_rows_of_the_compatibility_matrix_for_all_versions_of_Foo_and_Bar_given_the_pact_for_Foo_version_1.2.3_has_been_successfully_verified_by_Bar_version_4.5.6,_and_1.2.4_unsuccessfully_by_9.9.9) given the pact for Foo version 1.2.3 has been successfully verified by Bar version 4.5.6, and 1.2.4 unsuccessfully by 9.9.9
56
+
57
+ * [A request retrieve a pact for a specific version](#a_request_retrieve_a_pact_for_a_specific_version_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker,_and_Condor_already_has_a_pact_published_for_version_1.3.0) given the 'Pricing Service' and 'Condor' already exist in the pact-broker, and Condor already has a pact published for version 1.3.0
58
+
59
+ * [A request to create a global webhook with a JSON body](#a_request_to_create_a_global_webhook_with_a_JSON_body)
60
+
61
+ * [A request to create a pacticipant](#a_request_to_create_a_pacticipant)
62
+
63
+ * [A request to create a webhook for a consumer and provider](#a_request_to_create_a_webhook_for_a_consumer_and_provider_given_'Condor'_does_not_exist_in_the_pact-broker) given 'Condor' does not exist in the pact-broker
64
+
65
+ * [A request to create a webhook with a JSON body and a uuid](#a_request_to_create_a_webhook_with_a_JSON_body_and_a_uuid_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
66
+
67
+ * [A request to create a webhook with a JSON body for a consumer](#a_request_to_create_a_webhook_with_a_JSON_body_for_a_consumer_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
68
+
69
+ * [A request to create a webhook with a JSON body for a consumer and provider](#a_request_to_create_a_webhook_with_a_JSON_body_for_a_consumer_and_provider_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
70
+
71
+ * [A request to create a webhook with a JSON body for a consumer specified by a label](#a_request_to_create_a_webhook_with_a_JSON_body_for_a_consumer_specified_by_a_label)
72
+
73
+ * [A request to create a webhook with a JSON body for a consumer that does not exist](#a_request_to_create_a_webhook_with_a_JSON_body_for_a_consumer_that_does_not_exist)
74
+
75
+ * [A request to create a webhook with a JSON body for a provider](#a_request_to_create_a_webhook_with_a_JSON_body_for_a_provider_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
76
+
77
+ * [A request to create a webhook with a JSON body for a provider specified by a label](#a_request_to_create_a_webhook_with_a_JSON_body_for_a_provider_specified_by_a_label)
78
+
79
+ * [A request to create a webhook with a non-JSON body for a consumer and provider](#a_request_to_create_a_webhook_with_a_non-JSON_body_for_a_consumer_and_provider_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
80
+
81
+ * [A request to create a webhook with every possible event type](#a_request_to_create_a_webhook_with_every_possible_event_type_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
82
+
83
+ * [A request to create an environment](#a_request_to_create_an_environment)
84
+
85
+ * [A request to delete a pacticipant branch](#a_request_to_delete_a_pacticipant_branch_given_a_branch_named_main_exists_for_pacticipant_Foo) given a branch named main exists for pacticipant Foo
86
+
87
+ * [A request to determine if Bar can be deployed with all Foo tagged prod, ignoring the verification for Foo version 3.4.5](#a_request_to_determine_if_Bar_can_be_deployed_with_all_Foo_tagged_prod,_ignoring_the_verification_for_Foo_version_3.4.5_given_provider_Bar_version_4.5.6_has_a_successful_verification_for_Foo_version_1.2.3_tagged_prod_and_a_failed_verification_for_version_3.4.5_tagged_prod) given provider Bar version 4.5.6 has a successful verification for Foo version 1.2.3 tagged prod and a failed verification for version 3.4.5 tagged prod
88
+
89
+ * [A request to get the Pricing Service](#a_request_to_get_the_Pricing_Service_given_the_'Pricing_Service'_already_exists_in_the_pact-broker) given the 'Pricing Service' already exists in the pact-broker
90
+
91
+ * [A request to get the Pricing Service](#a_request_to_get_the_Pricing_Service_given_the_'Pricing_Service'_does_not_exist_in_the_pact-broker) given the 'Pricing Service' does not exist in the pact-broker
92
+
93
+ * [A request to list pacticipants](#a_request_to_list_pacticipants_given_'Condor'_exists_in_the_pact-broker) given 'Condor' exists in the pact-broker
94
+
95
+ * [A request to list the environments](#a_request_to_list_the_environments_given_an_environment_exists) given an environment exists
96
+
97
+ * [A request to list the latest pacts](#a_request_to_list_the_latest_pacts_given_a_pact_between_Condor_and_the_Pricing_Service_exists) given a pact between Condor and the Pricing Service exists
98
+
99
+ * [A request to list the versions deployed to an environment for a pacticipant name and application instance](#a_request_to_list_the_versions_deployed_to_an_environment_for_a_pacticipant_name_and_application_instance_given_an_version_is_deployed_to_environment_with_UUID_16926ef3-590f-4e3f-838e-719717aa88c9_with_target_customer-1) given an version is deployed to environment with UUID 16926ef3-590f-4e3f-838e-719717aa88c9 with target customer-1
100
+
101
+ * [A request to mark a deployed version as not currently deploye](#a_request_to_mark_a_deployed_version_as_not_currently_deploye_given_a_currently_deployed_version_exists) given a currently deployed version exists
102
+
103
+ * [A request to publish contracts](#a_request_to_publish_contracts)
104
+
105
+ * [A request to record a deployment](#a_request_to_record_a_deployment_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment
106
+
107
+ * [A request to record a release](#a_request_to_record_a_release_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment) given version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment
108
+
109
+ * [A request to register the repository URL of a pacticipant](#a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_'Pricing_Service'_already_exists_in_the_pact-broker) given the 'Pricing Service' already exists in the pact-broker
110
+
111
+ * [A request to register the repository URL of a pacticipant](#a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_'Pricing_Service'_does_not_exist_in_the_pact-broker) given the 'Pricing Service' does not exist in the pact-broker
112
+
113
+ * [A request to retrieve a pacticipant](#a_request_to_retrieve_a_pacticipant_given_a_pacticipant_with_name_Foo_exists) given a pacticipant with name Foo exists
114
+
115
+ * [A request to retrieve a pacticipant](#a_request_to_retrieve_a_pacticipant)
116
+
117
+ * [A request to retrieve the latest 'production' version of Condor](#a_request_to_retrieve_the_latest_'production'_version_of_Condor_given_'Condor'_exists_in_the_pact-broker_with_the_latest_tagged_'production'_version_1.2.3) given 'Condor' exists in the pact-broker with the latest tagged 'production' version 1.2.3
118
+
119
+ * [A request to retrieve the latest pact between Condor and the Pricing Service](#a_request_to_retrieve_the_latest_pact_between_Condor_and_the_Pricing_Service_given_a_pact_between_Condor_and_the_Pricing_Service_exists) given a pact between Condor and the Pricing Service exists
120
+
121
+ * [A request to retrieve the latest pact between Condor and the Pricing Service](#a_request_to_retrieve_the_latest_pact_between_Condor_and_the_Pricing_Service_given_no_pact_between_Condor_and_the_Pricing_Service_exists) given no pact between Condor and the Pricing Service exists
122
+
123
+ * [A request to retrieve the latest version of Condor](#a_request_to_retrieve_the_latest_version_of_Condor_given_'Condor'_exists_in_the_pact-broker_with_the_latest_version_1.2.3) given 'Condor' exists in the pact-broker with the latest version 1.2.3
124
+
125
+ * [A request to retrieve the pact between the production verison of Condor and the Pricing Service](#a_request_to_retrieve_the_pact_between_the_production_verison_of_Condor_and_the_Pricing_Service_given_a_pact_between_Condor_and_the_Pricing_Service_exists_for_the_production_version_of_Condor) given a pact between Condor and the Pricing Service exists for the production version of Condor
126
+
127
+ * [A request to tag the production version of Condor](#a_request_to_tag_the_production_version_of_Condor_given_'Condor'_exists_in_the_pact-broker_with_version_1.3.0,_tagged_with_'prod') given 'Condor' exists in the pact-broker with version 1.3.0, tagged with 'prod'
128
+
129
+ * [A request to tag the production version of Condor](#a_request_to_tag_the_production_version_of_Condor_given_'Condor'_does_not_exist_in_the_pact-broker) given 'Condor' does not exist in the pact-broker
130
+
131
+ * [A request to tag the production version of Condor](#a_request_to_tag_the_production_version_of_Condor_given_'Condor'_exists_in_the_pact-broker) given 'Condor' exists in the pact-broker
132
+
133
+ * [A request to update a pacticipant](#a_request_to_update_a_pacticipant_given_a_pacticipant_with_name_Foo_exists) given a pacticipant with name Foo exists
134
+
135
+ * [A request to update a webhook](#a_request_to_update_a_webhook_given_a_webhook_with_the_uuid_696c5f93-1b7f-44bc-8d03-59440fcaa9a0_exists) given a webhook with the uuid 696c5f93-1b7f-44bc-8d03-59440fcaa9a0 exists
136
+
137
+ * [An invalid request to create a webhook for a consumer and provider](#an_invalid_request_to_create_a_webhook_for_a_consumer_and_provider_given_the_'Pricing_Service'_and_'Condor'_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
138
+
139
+ #### Interactions
140
+
141
+ <a name="a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_2_environments_that_aren&#39;t_test_available_for_deployment"></a>
142
+ Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with 2 environments that aren't test available for deployment**, upon receiving **a request for a pacticipant version** from Pact Broker Client V2, with
143
+ ```json
144
+ {
145
+ "method": "GET",
146
+ "path": "/pacticipants/Foo/versions/5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
147
+ "headers": {
148
+ "Accept": "application/hal+json"
149
+ }
150
+ }
151
+ ```
152
+ Pact Broker will respond with:
153
+ ```json
154
+ {
155
+ "status": 200,
156
+ "headers": {
157
+ "Content-Type": "application/hal+json;charset=utf-8"
158
+ },
159
+ "body": {
160
+ "_links": {
161
+ "pb:record-deployment": [
162
+ {
163
+ "href": "href",
164
+ "name": "prod"
165
+ },
166
+ {
167
+ "href": "href",
168
+ "name": "dev"
169
+ }
170
+ ]
171
+ }
172
+ }
173
+ }
174
+ ```
175
+ <a name="a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment"></a>
176
+ Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment**, upon receiving **a request for a pacticipant version** from Pact Broker Client V2, with
177
+ ```json
178
+ {
179
+ "method": "GET",
180
+ "path": "/pacticipants/Foo/versions/5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
181
+ "headers": {
182
+ "Accept": "application/hal+json"
183
+ }
184
+ }
185
+ ```
186
+ Pact Broker will respond with:
187
+ ```json
188
+ {
189
+ "status": 200,
190
+ "headers": {
191
+ "Content-Type": "application/hal+json;charset=utf-8"
192
+ },
193
+ "body": {
194
+ "_links": {
195
+ "pb:record-deployment": [
196
+ {
197
+ "href": "/pacticipants/Foo/versions/5556b8149bf8bac76bc30f50a8a2dd4c22c85f30/deployed-versions/environment/cb632df3-0a0d-4227-aac3-60114dd36479",
198
+ "name": "test"
199
+ }
200
+ ]
201
+ }
202
+ }
203
+ }
204
+ ```
205
+ <a name="a_request_for_a_pacticipant_version_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_release"></a>
206
+ Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for release**, upon receiving **a request for a pacticipant version** from Pact Broker Client V2, with
207
+ ```json
208
+ {
209
+ "method": "GET",
210
+ "path": "/pacticipants/Foo/versions/5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
211
+ "headers": {
212
+ "Accept": "application/hal+json"
213
+ }
214
+ }
215
+ ```
216
+ Pact Broker will respond with:
217
+ ```json
218
+ {
219
+ "status": 200,
220
+ "headers": {
221
+ "Content-Type": "application/hal+json;charset=utf-8"
222
+ },
223
+ "body": {
224
+ "_links": {
225
+ "pb:record-release": [
226
+ {
227
+ "href": "/pacticipants/Foo/versions/5556b8149bf8bac76bc30f50a8a2dd4c22c85f30/released-versions/environment/cb632df3-0a0d-4227-aac3-60114dd36479",
228
+ "name": "test"
229
+ }
230
+ ]
231
+ }
232
+ }
233
+ }
234
+ ```
235
+ <a name="a_request_for_an_environment_given_an_environment_with_name_test_and_UUID_16926ef3-590f-4e3f-838e-719717aa88c9_exists"></a>
236
+ Given **an environment with name test and UUID 16926ef3-590f-4e3f-838e-719717aa88c9 exists**, upon receiving **a request for an environment** from Pact Broker Client V2, with
237
+ ```json
238
+ {
239
+ "method": "GET",
240
+ "path": "/environments/16926ef3-590f-4e3f-838e-719717aa88c9",
241
+ "headers": {
242
+ "Accept": "application/hal+json"
243
+ }
244
+ }
245
+ ```
246
+ Pact Broker will respond with:
247
+ ```json
248
+ {
249
+ "status": 200,
250
+ "headers": {
251
+ "Content-Type": "application/hal+json;charset=utf-8"
252
+ },
253
+ "body": {
254
+ "_links": {
255
+ "pb:currently-deployed-deployed-versions": {
256
+ "href": "/environments/16926ef3-590f-4e3f-838e-719717aa88c9/deployed-versions/currently-deployed"
257
+ }
258
+ }
259
+ }
260
+ }
261
+ ```
262
+ <a name="a_request_for_the_compatibility_matrix_for_a_pacticipant_that_does_not_exist"></a>
263
+ Upon receiving **a request for the compatibility matrix for a pacticipant that does not exist** from Pact Broker Client V2, with
264
+ ```json
265
+ {
266
+ "method": "GET",
267
+ "path": "/matrix",
268
+ "query": "latestby=cvpv&q[][pacticipant]=Wiffle&q[][pacticipant]=Meep&q[][version]=1%2e2%2e3&q[][version]=9%2e9%2e9"
269
+ }
270
+ ```
271
+ Pact Broker will respond with:
272
+ ```json
273
+ {
274
+ "status": 400,
275
+ "headers": {
276
+ "Content-Type": "application/hal+json;charset=utf-8"
277
+ },
278
+ "body": {
279
+ "errors": [
280
+ "an error message"
281
+ ]
282
+ }
283
+ }
284
+ ```
285
+ <a name="a_request_for_the_compatibility_matrix_for_all_versions_of_Foo_and_Bar_given_the_pact_for_Foo_version_1.2.3_and_1.2.4_has_been_verified_by_Bar_version_4.5.6"></a>
286
+ Given **the pact for Foo version 1.2.3 and 1.2.4 has been verified by Bar version 4.5.6**, upon receiving **a request for the compatibility matrix for all versions of Foo and Bar** from Pact Broker Client V2, with
287
+ ```json
288
+ {
289
+ "method": "GET",
290
+ "path": "/matrix",
291
+ "query": "latestby=cvpv&q[][pacticipant]=Foo&q[][pacticipant]=Bar"
292
+ }
293
+ ```
294
+ Pact Broker will respond with:
295
+ ```json
296
+ {
297
+ "status": 200,
298
+ "headers": {
299
+ "Content-Type": "application/hal+json;charset=utf-8"
300
+ },
301
+ "body": {
302
+ "matrix": [
303
+ {
304
+ "consumer": {
305
+ "name": "Foo",
306
+ "version": {
307
+ "number": "4"
308
+ }
309
+ },
310
+ "pact": {
311
+ "createdAt": "2017-10-10T12:49:04+11:00"
312
+ },
313
+ "provider": {
314
+ "name": "Bar",
315
+ "version": {
316
+ "number": "5"
317
+ }
318
+ },
319
+ "verificationResult": {
320
+ "_links": {
321
+ "self": {
322
+ "href": "http://result"
323
+ }
324
+ },
325
+ "success": true,
326
+ "verifiedAt": "2017-10-10T12:49:04+11:00"
327
+ }
328
+ },
329
+ {
330
+ "consumer": {
331
+ "name": "Foo",
332
+ "version": {
333
+ "number": "4"
334
+ }
335
+ },
336
+ "pact": {
337
+ "createdAt": "2017-10-10T12:49:04+11:00"
338
+ },
339
+ "provider": {
340
+ "name": "Bar",
341
+ "version": {
342
+ "number": "5"
343
+ }
344
+ },
345
+ "verificationResult": {
346
+ "_links": {
347
+ "self": {
348
+ "href": "http://result"
349
+ }
350
+ },
351
+ "success": true,
352
+ "verifiedAt": "2017-10-10T12:49:04+11:00"
353
+ }
354
+ }
355
+ ]
356
+ }
357
+ }
358
+ ```
359
+ <a name="a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_Bar_version_4.5.6_given_the_pact_for_Foo_Thing_version_1.2.3_has_been_verified_by_Bar_version_4.5.6"></a>
360
+ Given **the pact for Foo Thing version 1.2.3 has been verified by Bar version 4.5.6**, upon receiving **a request for the compatibility matrix for Foo version 1.2.3 and Bar version 4.5.6** from Pact Broker Client V2, with
361
+ ```json
362
+ {
363
+ "method": "GET",
364
+ "path": "/matrix",
365
+ "query": "latestby=cvpv&q[][pacticipant]=Foo+Thing&q[][pacticipant]=Bar&q[][version]=1%2e2%2e3&q[][version]=4%2e5%2e6"
366
+ }
367
+ ```
368
+ Pact Broker will respond with:
369
+ ```json
370
+ {
371
+ "status": 200,
372
+ "headers": {
373
+ "Content-Type": "application/hal+json;charset=utf-8"
374
+ },
375
+ "body": {
376
+ "matrix": [
377
+ {
378
+ "consumer": {
379
+ "name": "Foo",
380
+ "version": {
381
+ "number": "4"
382
+ }
383
+ },
384
+ "pact": {
385
+ "createdAt": "2017-10-10T12:49:04+11:00"
386
+ },
387
+ "provider": {
388
+ "name": "Bar",
389
+ "version": {
390
+ "number": "5"
391
+ }
392
+ },
393
+ "verificationResult": {
394
+ "_links": {
395
+ "self": {
396
+ "href": "http://result"
397
+ }
398
+ },
399
+ "success": true,
400
+ "verifiedAt": "2017-10-10T12:49:04+11:00"
401
+ }
402
+ }
403
+ ],
404
+ "summary": {
405
+ "deployable": true,
406
+ "reason": "some text",
407
+ "unknown": 1
408
+ }
409
+ }
410
+ }
411
+ ```
412
+ <a name="a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_Bar_version_4.5.6_given_the_pact_for_Foo_version_1.2.3_has_been_verified_by_Bar_version_4.5.6"></a>
413
+ Given **the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6**, upon receiving **a request for the compatibility matrix for Foo version 1.2.3 and Bar version 4.5.6** from Pact Broker Client V2, with
414
+ ```json
415
+ {
416
+ "method": "GET",
417
+ "path": "/matrix",
418
+ "query": "latestby=cvpv&q[][pacticipant]=Foo&q[][pacticipant]=Bar&q[][version]=1%2e2%2e3&q[][version]=4%2e5%2e6"
419
+ }
420
+ ```
421
+ Pact Broker will respond with:
422
+ ```json
423
+ {
424
+ "status": 200,
425
+ "headers": {
426
+ "Content-Type": "application/hal+json;charset=utf-8"
427
+ },
428
+ "body": {
429
+ "matrix": [
430
+ {
431
+ "consumer": {
432
+ "name": "Foo",
433
+ "version": {
434
+ "number": "4"
435
+ }
436
+ },
437
+ "pact": {
438
+ "createdAt": "2017-10-10T12:49:04+11:00"
439
+ },
440
+ "provider": {
441
+ "name": "Bar",
442
+ "version": {
443
+ "number": "5"
444
+ }
445
+ },
446
+ "verificationResult": {
447
+ "_links": {
448
+ "self": {
449
+ "href": "http://result"
450
+ }
451
+ },
452
+ "success": true,
453
+ "verifiedAt": "2017-10-10T12:49:04+11:00"
454
+ }
455
+ }
456
+ ],
457
+ "summary": {
458
+ "deployable": true,
459
+ "reason": "some text",
460
+ "unknown": 1
461
+ }
462
+ }
463
+ }
464
+ ```
465
+ <a name="a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_the_latest_prod_version_of_Bar_given_the_pact_for_Foo_version_1.2.3_has_been_successfully_verified_by_Bar_version_4.5.6_with_tag_prod,_and_1.2.4_unsuccessfully_by_9.9.9"></a>
466
+ Given **the pact for Foo version 1.2.3 has been successfully verified by Bar version 4.5.6 with tag prod, and 1.2.4 unsuccessfully by 9.9.9**, upon receiving **a request for the compatibility matrix for Foo version 1.2.3 and the latest prod version of Bar** from Pact Broker Client V2, with
467
+ ```json
468
+ {
469
+ "method": "GET",
470
+ "path": "/matrix",
471
+ "query": "latestby=cvpv&q[][latest]=true&q[][pacticipant]=Foo&q[][pacticipant]=Bar&q[][tag]=prod&q[][version]=1%2e2%2e3"
472
+ }
473
+ ```
474
+ Pact Broker will respond with:
475
+ ```json
476
+ {
477
+ "status": 200,
478
+ "headers": {
479
+ "Content-Type": "application/hal+json;charset=utf-8"
480
+ },
481
+ "body": {
482
+ "matrix": [
483
+ {
484
+ "consumer": {
485
+ "name": "Foo",
486
+ "version": {
487
+ "number": "4"
488
+ }
489
+ },
490
+ "pact": {
491
+ "createdAt": "2017-10-10T12:49:04+11:00"
492
+ },
493
+ "provider": {
494
+ "name": "Bar",
495
+ "version": {
496
+ "number": "5"
497
+ }
498
+ },
499
+ "verificationResult": {
500
+ "_links": {
501
+ "self": {
502
+ "href": "http://result"
503
+ }
504
+ },
505
+ "success": true,
506
+ "verifiedAt": "2017-10-10T12:49:04+11:00"
507
+ }
508
+ }
509
+ ],
510
+ "summary": {
511
+ "deployable": true,
512
+ "reason": "some text",
513
+ "unknown": 1
514
+ }
515
+ }
516
+ }
517
+ ```
518
+ <a name="a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_the_latest_prod_versions_of_all_other_pacticipants_given_the_pact_for_Foo_version_1.2.3_has_been_successfully_verified_by_Bar_version_4.5.6_(tagged_prod)_and_version_5.6.7"></a>
519
+ Given **the pact for Foo version 1.2.3 has been successfully verified by Bar version 4.5.6 (tagged prod) and version 5.6.7**, upon receiving **a request for the compatibility matrix for Foo version 1.2.3 and the latest prod versions of all other pacticipants** from Pact Broker Client V2, with
520
+ ```json
521
+ {
522
+ "method": "GET",
523
+ "path": "/matrix",
524
+ "query": "latest=true&latestby=cvp&q[][pacticipant]=Foo&q[][version]=1%2e2%2e3&tag=prod"
525
+ }
526
+ ```
527
+ Pact Broker will respond with:
528
+ ```json
529
+ {
530
+ "status": 200,
531
+ "headers": {
532
+ "Content-Type": "application/hal+json;charset=utf-8"
533
+ },
534
+ "body": {
535
+ "matrix": [
536
+ {
537
+ "consumer": {
538
+ "name": "Foo",
539
+ "version": {
540
+ "number": "1.2.3"
541
+ }
542
+ },
543
+ "provider": {
544
+ "name": "Bar",
545
+ "version": {
546
+ "number": "4.5.6"
547
+ }
548
+ }
549
+ }
550
+ ]
551
+ }
552
+ }
553
+ ```
554
+ <a name="a_request_for_the_compatibility_matrix_for_Foo_version_1.2.3_and_the_latest_version_of_Bar_given_the_pact_for_Foo_version_1.2.3_has_been_successfully_verified_by_Bar_version_4.5.6,_and_1.2.4_unsuccessfully_by_9.9.9"></a>
555
+ Given **the pact for Foo version 1.2.3 has been successfully verified by Bar version 4.5.6, and 1.2.4 unsuccessfully by 9.9.9**, upon receiving **a request for the compatibility matrix for Foo version 1.2.3 and the latest version of Bar** from Pact Broker Client V2, with
556
+ ```json
557
+ {
558
+ "method": "GET",
559
+ "path": "/matrix",
560
+ "query": "latestby=cvpv&q[][latest]=true&q[][pacticipant]=Foo&q[][pacticipant]=Bar&q[][version]=1%2e2%2e4"
561
+ }
562
+ ```
563
+ Pact Broker will respond with:
564
+ ```json
565
+ {
566
+ "status": 200,
567
+ "headers": {
568
+ "Content-Type": "application/hal+json;charset=utf-8"
569
+ },
570
+ "body": {
571
+ "matrix": [
572
+ {
573
+ "consumer": {
574
+ "name": "Foo",
575
+ "version": {
576
+ "number": "4"
577
+ }
578
+ },
579
+ "pact": {
580
+ "createdAt": "2017-10-10T12:49:04+11:00"
581
+ },
582
+ "provider": {
583
+ "name": "Bar",
584
+ "version": {
585
+ "number": "5"
586
+ }
587
+ },
588
+ "verificationResult": {
589
+ "_links": {
590
+ "self": {
591
+ "href": "http://result"
592
+ }
593
+ },
594
+ "success": true,
595
+ "verifiedAt": "2017-10-10T12:49:04+11:00"
596
+ }
597
+ }
598
+ ],
599
+ "summary": {
600
+ "deployable": true,
601
+ "reason": "some text",
602
+ "unknown": 1
603
+ }
604
+ }
605
+ }
606
+ ```
607
+ <a name="a_request_for_the_compatibility_matrix_where_one_or_more_versions_does_not_exist_given_the_pact_for_Foo_version_1.2.3_has_been_verified_by_Bar_version_4.5.6"></a>
608
+ Given **the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6**, upon receiving **a request for the compatibility matrix where one or more versions does not exist** from Pact Broker Client V2, with
609
+ ```json
610
+ {
611
+ "method": "GET",
612
+ "path": "/matrix",
613
+ "query": "latestby=cvpv&q[][pacticipant]=Foo&q[][pacticipant]=Bar&q[][version]=1%2e2%2e3&q[][version]=9%2e9%2e9"
614
+ }
615
+ ```
616
+ Pact Broker will respond with:
617
+ ```json
618
+ {
619
+ "status": 200,
620
+ "headers": {
621
+ "Content-Type": "application/hal+json;charset=utf-8"
622
+ },
623
+ "body": {
624
+ "summary": {
625
+ "reason": "an error message"
626
+ }
627
+ }
628
+ }
629
+ ```
630
+ <a name="a_request_for_the_compatibility_matrix_where_only_the_version_of_Foo_is_specified_given_the_pact_for_Foo_version_1.2.3_has_been_verified_by_Bar_version_4.5.6_and_version_5.6.7"></a>
631
+ Given **the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6 and version 5.6.7**, upon receiving **a request for the compatibility matrix where only the version of Foo is specified** from Pact Broker Client V2, with
632
+ ```json
633
+ {
634
+ "method": "GET",
635
+ "path": "/matrix",
636
+ "query": "latest=true&latestby=cvp&q[][pacticipant]=Foo&q[][version]=1%2e2%2e3"
637
+ }
638
+ ```
639
+ Pact Broker will respond with:
640
+ ```json
641
+ {
642
+ "status": 200,
643
+ "headers": {
644
+ "Content-Type": "application/hal+json;charset=utf-8"
645
+ },
646
+ "body": {
647
+ "matrix": [
648
+ {
649
+ "consumer": {
650
+ "name": "Foo",
651
+ "version": {
652
+ "number": "4"
653
+ }
654
+ },
655
+ "pact": {
656
+ "createdAt": "2017-10-10T12:49:04+11:00"
657
+ },
658
+ "provider": {
659
+ "name": "Bar",
660
+ "version": {
661
+ "number": "5"
662
+ }
663
+ },
664
+ "verificationResult": {
665
+ "_links": {
666
+ "self": {
667
+ "href": "http://result"
668
+ }
669
+ },
670
+ "success": true,
671
+ "verifiedAt": "2017-10-10T12:49:04+11:00"
672
+ }
673
+ }
674
+ ],
675
+ "summary": {
676
+ "deployable": true,
677
+ "reason": "some text",
678
+ "unknown": 1
679
+ }
680
+ }
681
+ }
682
+ ```
683
+ <a name="a_request_for_the_environments_given_an_environment_with_name_test_exists"></a>
684
+ Given **an environment with name test exists**, upon receiving **a request for the environments** from Pact Broker Client V2, with
685
+ ```json
686
+ {
687
+ "method": "GET",
688
+ "path": "/environments",
689
+ "headers": {
690
+ "Accept": "application/hal+json"
691
+ }
692
+ }
693
+ ```
694
+ Pact Broker will respond with:
695
+ ```json
696
+ {
697
+ "status": 200,
698
+ "headers": {
699
+ "Content-Type": "application/hal+json;charset=utf-8"
700
+ },
701
+ "body": {
702
+ "_links": {
703
+ "pb:environments": [
704
+ {
705
+ "href": "href",
706
+ "name": "test"
707
+ }
708
+ ]
709
+ }
710
+ }
711
+ }
712
+ ```
713
+ <a name="a_request_for_the_index_resource"></a>
714
+ Upon receiving **a request for the index resource** from Pact Broker Client V2, with
715
+ ```json
716
+ {
717
+ "method": "GET",
718
+ "path": "/",
719
+ "headers": {
720
+ "Accept": "application/hal+json"
721
+ }
722
+ }
723
+ ```
724
+ Pact Broker will respond with:
725
+ ```json
726
+ {
727
+ "status": 200,
728
+ "headers": {
729
+ "Content-Type": "application/hal+json;charset=utf-8"
730
+ },
731
+ "body": {
732
+ "_links": {
733
+ "pb:pacticipant": {
734
+ "href": "/pacticipants/{pacticipant}"
735
+ },
736
+ "pb:pacticipants": {
737
+ "href": "/pacticipants"
738
+ },
739
+ "pb:webhooks": {
740
+ "href": "/webhooks"
741
+ }
742
+ }
743
+ }
744
+ }
745
+ ```
746
+ <a name="a_request_for_the_index_resource_given_the_pacticipant_relations_are_present"></a>
747
+ Given **the pacticipant relations are present**, upon receiving **a request for the index resource** from Pact Broker Client V2, with
748
+ ```json
749
+ {
750
+ "method": "GET",
751
+ "path": "/",
752
+ "headers": {
753
+ "Accept": "application/hal+json"
754
+ }
755
+ }
756
+ ```
757
+ Pact Broker will respond with:
758
+ ```json
759
+ {
760
+ "status": 200,
761
+ "headers": {
762
+ "Content-Type": "application/hal+json;charset=utf-8"
763
+ },
764
+ "body": {
765
+ "_links": {
766
+ "pb:pacticipant": {
767
+ "href": "/pacticipants/{pacticipant}"
768
+ },
769
+ "pb:pacticipants": {
770
+ "href": "/pacticipants"
771
+ }
772
+ }
773
+ }
774
+ }
775
+ ```
776
+ <a name="a_request_for_the_index_resource_given_the_pb:environments_relation_exists_in_the_index_resource"></a>
777
+ Given **the pb:environments relation exists in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client V2, with
778
+ ```json
779
+ {
780
+ "method": "GET",
781
+ "path": "/",
782
+ "headers": {
783
+ "Accept": "application/hal+json"
784
+ }
785
+ }
786
+ ```
787
+ Pact Broker will respond with:
788
+ ```json
789
+ {
790
+ "status": 200,
791
+ "headers": {
792
+ "Content-Type": "application/hal+json;charset=utf-8"
793
+ },
794
+ "body": {
795
+ "_links": {
796
+ "pb:environments": {
797
+ "href": "/environments"
798
+ }
799
+ }
800
+ }
801
+ }
802
+ ```
803
+ <a name="a_request_for_the_index_resource_given_the_pb:latest-tagged-version_relation_exists_in_the_index_resource"></a>
804
+ Given **the pb:latest-tagged-version relation exists in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client V2, with
805
+ ```json
806
+ {
807
+ "method": "GET",
808
+ "path": "/",
809
+ "headers": {
810
+ "Accept": "application/hal+json, application/json"
811
+ }
812
+ }
813
+ ```
814
+ Pact Broker will respond with:
815
+ ```json
816
+ {
817
+ "status": 200,
818
+ "headers": {
819
+ "Content-Type": "application/hal+json;charset=utf-8"
820
+ },
821
+ "body": {
822
+ "_links": {
823
+ "pb:latest-tagged-version": {
824
+ "href": "http://127.0.0.1:9999/pacticipants/Condor/latest-version/production"
825
+ }
826
+ }
827
+ }
828
+ }
829
+ ```
830
+ <a name="a_request_for_the_index_resource_given_the_pb:latest-version_relation_exists_in_the_index_resource"></a>
831
+ Given **the pb:latest-version relation exists in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client V2, with
832
+ ```json
833
+ {
834
+ "method": "GET",
835
+ "path": "/",
836
+ "headers": {
837
+ "Accept": "application/hal+json, application/json"
838
+ }
839
+ }
840
+ ```
841
+ Pact Broker will respond with:
842
+ ```json
843
+ {
844
+ "status": 200,
845
+ "headers": {
846
+ "Content-Type": "application/hal+json;charset=utf-8"
847
+ },
848
+ "body": {
849
+ "_links": {
850
+ "pb:latest-version": {
851
+ "href": "http://127.0.0.1:9999/pacticipants/Condor/latest-version"
852
+ }
853
+ }
854
+ }
855
+ }
856
+ ```
857
+ <a name="a_request_for_the_index_resource_given_the_pb:pacticipant-branch_relation_exists_in_the_index_resource"></a>
858
+ Given **the pb:pacticipant-branch relation exists in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client V2, with
859
+ ```json
860
+ {
861
+ "method": "GET",
862
+ "path": "/",
863
+ "headers": {
864
+ "Accept": "application/hal+json"
865
+ }
866
+ }
867
+ ```
868
+ Pact Broker will respond with:
869
+ ```json
870
+ {
871
+ "status": 200,
872
+ "headers": {
873
+ "Content-Type": "application/hal+json;charset=utf-8"
874
+ },
875
+ "body": {
876
+ "_links": {
877
+ "pb:pacticipant-branch": {
878
+ "href": "/pacticipants/{pacticipant}/branches/{branch}"
879
+ }
880
+ }
881
+ }
882
+ }
883
+ ```
884
+ <a name="a_request_for_the_index_resource_given_the_pb:pacticipant-version_and_pb:environments_relations_exist_in_the_index_resource"></a>
885
+ Given **the pb:pacticipant-version and pb:environments relations exist in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client V2, with
886
+ ```json
887
+ {
888
+ "method": "GET",
889
+ "path": "/",
890
+ "headers": {
891
+ "Accept": "application/hal+json"
892
+ }
893
+ }
894
+ ```
895
+ Pact Broker will respond with:
896
+ ```json
897
+ {
898
+ "status": 200,
899
+ "headers": {
900
+ "Content-Type": "application/hal+json;charset=utf-8"
901
+ },
902
+ "body": {
903
+ "_links": {
904
+ "pb:environments": {
905
+ "href": "/environments"
906
+ },
907
+ "pb:pacticipant-version": {
908
+ "href": "/pacticipants/{pacticipant}/versions/{version}"
909
+ }
910
+ }
911
+ }
912
+ }
913
+ ```
914
+ <a name="a_request_for_the_index_resource_given_the_pb:publish-contracts_relations_exists_in_the_index_resource"></a>
915
+ Given **the pb:publish-contracts relations exists in the index resource**, upon receiving **a request for the index resource** from Pact Broker Client V2, with
916
+ ```json
917
+ {
918
+ "method": "GET",
919
+ "path": "/",
920
+ "headers": {
921
+ "Accept": "application/hal+json"
922
+ }
923
+ }
924
+ ```
925
+ Pact Broker will respond with:
926
+ ```json
927
+ {
928
+ "status": 200,
929
+ "headers": {
930
+ "Content-Type": "application/hal+json;charset=utf-8"
931
+ },
932
+ "body": {
933
+ "_links": {
934
+ "pb:publish-contracts": {
935
+ "href": "/contracts/publish"
936
+ }
937
+ }
938
+ }
939
+ }
940
+ ```
941
+ <a name="a_request_for_the_index_resource_with_the_webhook_relation"></a>
942
+ Upon receiving **a request for the index resource with the webhook relation** from Pact Broker Client V2, with
943
+ ```json
944
+ {
945
+ "method": "GET",
946
+ "path": "/",
947
+ "headers": {
948
+ "Accept": "application/hal+json"
949
+ }
950
+ }
951
+ ```
952
+ Pact Broker will respond with:
953
+ ```json
954
+ {
955
+ "status": 200,
956
+ "headers": {
957
+ "Content-Type": "application/hal+json;charset=utf-8"
958
+ },
959
+ "body": {
960
+ "_links": {
961
+ "pb:webhook": {
962
+ "href": "/webhooks/{uuid}",
963
+ "templated": true
964
+ }
965
+ }
966
+ }
967
+ }
968
+ ```
969
+ <a name="a_request_for_the_list_of_the_latest_pacts_from_all_consumers_for_the_Pricing_Service&#39;_given_a_latest_pact_between_Condor_and_the_Pricing_Service_exists"></a>
970
+ Given **a latest pact between Condor and the Pricing Service exists**, upon receiving **a request for the list of the latest pacts from all consumers for the Pricing Service'** from Pact Broker Client V2, with
971
+ ```json
972
+ {
973
+ "method": "GET",
974
+ "path": "/pacts/provider/Pricing%20Service/latest"
975
+ }
976
+ ```
977
+ Pact Broker will respond with:
978
+ ```json
979
+ {
980
+ "status": 200,
981
+ "headers": {
982
+ "Content-Type": "application/hal+json"
983
+ },
984
+ "body": {
985
+ "_links": {
986
+ "pb:pacts": [
987
+ {
988
+ "href": "http://example.org/pacts/provider/Pricing%20Service/consumer/Condor/version/1.3.0",
989
+ "name": "Condor",
990
+ "title": "Pact between Condor (v1.3.0) and Pricing Service"
991
+ }
992
+ ],
993
+ "provider": {
994
+ "href": "http://example.org/pacticipants/Pricing%20Service",
995
+ "title": "Pricing Service"
996
+ }
997
+ }
998
+ }
999
+ }
1000
+ ```
1001
+ <a name="a_request_for_the_list_of_the_latest_prod_pacts_from_all_consumers_for_the_Pricing_Service&#39;_given_tagged_as_prod_pact_between_Condor_and_the_Pricing_Service_exists"></a>
1002
+ Given **tagged as prod pact between Condor and the Pricing Service exists**, upon receiving **a request for the list of the latest prod pacts from all consumers for the Pricing Service'** from Pact Broker Client V2, with
1003
+ ```json
1004
+ {
1005
+ "method": "GET",
1006
+ "path": "/pacts/provider/Pricing%20Service/latest/prod"
1007
+ }
1008
+ ```
1009
+ Pact Broker will respond with:
1010
+ ```json
1011
+ {
1012
+ "status": 200,
1013
+ "headers": {
1014
+ "Content-Type": "application/hal+json"
1015
+ },
1016
+ "body": {
1017
+ "_links": {
1018
+ "pb:pacts": [
1019
+ {
1020
+ "href": "http://example.org/pacts/provider/Pricing%20Service/consumer/Condor/version/1.3.0",
1021
+ "name": "Condor",
1022
+ "title": "Pact between Condor (v1.3.0) and Pricing Service"
1023
+ }
1024
+ ],
1025
+ "provider": {
1026
+ "href": "http://example.org/pacticipants/Pricing%20Service",
1027
+ "title": "Pricing Service"
1028
+ }
1029
+ }
1030
+ }
1031
+ }
1032
+ ```
1033
+ <a name="a_request_for_the_successful_rows_of_the_compatibility_matrix_for_all_versions_of_Foo_and_Bar_given_the_pact_for_Foo_version_1.2.3_has_been_successfully_verified_by_Bar_version_4.5.6,_and_1.2.4_unsuccessfully_by_9.9.9"></a>
1034
+ Given **the pact for Foo version 1.2.3 has been successfully verified by Bar version 4.5.6, and 1.2.4 unsuccessfully by 9.9.9**, upon receiving **a request for the successful rows of the compatibility matrix for all versions of Foo and Bar** from Pact Broker Client V2, with
1035
+ ```json
1036
+ {
1037
+ "method": "GET",
1038
+ "path": "/matrix",
1039
+ "query": "latestby=cvpv&q[][pacticipant]=Foo&q[][pacticipant]=Bar&success[]=true"
1040
+ }
1041
+ ```
1042
+ Pact Broker will respond with:
1043
+ ```json
1044
+ {
1045
+ "status": 200,
1046
+ "headers": {
1047
+ "Content-Type": "application/hal+json;charset=utf-8"
1048
+ },
1049
+ "body": {
1050
+ "matrix": [
1051
+ {
1052
+ "consumer": {
1053
+ "name": "Foo",
1054
+ "version": {
1055
+ "number": "4"
1056
+ }
1057
+ },
1058
+ "pact": {
1059
+ "createdAt": "2017-10-10T12:49:04+11:00"
1060
+ },
1061
+ "provider": {
1062
+ "name": "Bar",
1063
+ "version": {
1064
+ "number": "5"
1065
+ }
1066
+ },
1067
+ "verificationResult": {
1068
+ "_links": {
1069
+ "self": {
1070
+ "href": "http://result"
1071
+ }
1072
+ },
1073
+ "success": true,
1074
+ "verifiedAt": "2017-10-10T12:49:04+11:00"
1075
+ }
1076
+ }
1077
+ ],
1078
+ "summary": {
1079
+ "deployable": true,
1080
+ "reason": "some text",
1081
+ "unknown": 1
1082
+ }
1083
+ }
1084
+ }
1085
+ ```
1086
+ <a name="a_request_retrieve_a_pact_for_a_specific_version_given_the_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker,_and_Condor_already_has_a_pact_published_for_version_1.3.0"></a>
1087
+ Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker, and Condor already has a pact published for version 1.3.0**, upon receiving **a request retrieve a pact for a specific version** from Pact Broker Client V2, with
1088
+ ```json
1089
+ {
1090
+ "method": "GET",
1091
+ "path": "/pacts/provider/Pricing%20Service/consumer/Condor/version/1.3.0"
1092
+ }
1093
+ ```
1094
+ Pact Broker will respond with:
1095
+ ```json
1096
+ {
1097
+ "status": 200,
1098
+ "headers": {
1099
+ "Content-Type": "application/hal+json;charset=utf-8"
1100
+ },
1101
+ "body": {
1102
+ "consumer": {
1103
+ "name": "Condor"
1104
+ },
1105
+ "interactions": [
1106
+ ],
1107
+ "provider": {
1108
+ "name": "Pricing Service"
1109
+ }
1110
+ }
1111
+ }
1112
+ ```
1113
+ <a name="a_request_to_create_a_global_webhook_with_a_JSON_body"></a>
1114
+ Upon receiving **a request to create a global webhook with a JSON body** from Pact Broker Client V2, with
1115
+ ```json
1116
+ {
1117
+ "method": "POST",
1118
+ "path": "/webhooks",
1119
+ "headers": {
1120
+ "Accept": "application/hal+json",
1121
+ "Content-Type": "application/json"
1122
+ },
1123
+ "body": {
1124
+ "description": "a webhook",
1125
+ "events": [
1126
+ {
1127
+ "name": "contract_content_changed"
1128
+ }
1129
+ ],
1130
+ "request": {
1131
+ "body": {
1132
+ "some": "body"
1133
+ },
1134
+ "headers": {
1135
+ "Bar": "foo",
1136
+ "Foo": "bar"
1137
+ },
1138
+ "method": "POST",
1139
+ "password": "password",
1140
+ "url": "https://webhook",
1141
+ "username": "username"
1142
+ }
1143
+ }
1144
+ }
1145
+ ```
1146
+ Pact Broker will respond with:
1147
+ ```json
1148
+ {
1149
+ "status": 201,
1150
+ "headers": {
1151
+ "Content-Type": "application/hal+json;charset=utf-8"
1152
+ },
1153
+ "body": {
1154
+ "_links": {
1155
+ "self": {
1156
+ "href": "/some-url"
1157
+ }
1158
+ },
1159
+ "description": "a webhook",
1160
+ "events": [
1161
+ {
1162
+ "name": "contract_content_changed"
1163
+ }
1164
+ ],
1165
+ "request": {
1166
+ "body": {
1167
+ "some": "body"
1168
+ }
1169
+ }
1170
+ }
1171
+ }
1172
+ ```
1173
+ <a name="a_request_to_create_a_pacticipant"></a>
1174
+ Upon receiving **a request to create a pacticipant** from Pact Broker Client V2, with
1175
+ ```json
1176
+ {
1177
+ "method": "POST",
1178
+ "path": "/pacticipants",
1179
+ "headers": {
1180
+ "Accept": "application/hal+json",
1181
+ "Content-Type": "application/json"
1182
+ },
1183
+ "body": {
1184
+ "name": "Foo",
1185
+ "repositoryUrl": "http://foo"
1186
+ }
1187
+ }
1188
+ ```
1189
+ Pact Broker will respond with:
1190
+ ```json
1191
+ {
1192
+ "status": 201,
1193
+ "headers": {
1194
+ "Content-Type": "application/hal+json;charset=utf-8"
1195
+ },
1196
+ "body": {
1197
+ "_links": {
1198
+ "self": {
1199
+ "href": "/pacticipants/Foo"
1200
+ }
1201
+ },
1202
+ "name": "Foo",
1203
+ "repositoryUrl": "http://foo"
1204
+ }
1205
+ }
1206
+ ```
1207
+ <a name="a_request_to_create_a_webhook_for_a_consumer_and_provider_given_&#39;Condor&#39;_does_not_exist_in_the_pact-broker"></a>
1208
+ Given **'Condor' does not exist in the pact-broker**, upon receiving **a request to create a webhook for a consumer and provider** from Pact Broker Client V2, with
1209
+ ```json
1210
+ {
1211
+ "method": "POST",
1212
+ "path": "/webhooks/provider/Pricing%20Service/consumer/Condor",
1213
+ "headers": {
1214
+ "Accept": "application/hal+json",
1215
+ "Content-Type": "application/json"
1216
+ },
1217
+ "body": {
1218
+ "description": "a webhook",
1219
+ "events": [
1220
+ {
1221
+ "name": "contract_content_changed"
1222
+ }
1223
+ ],
1224
+ "request": {
1225
+ "body": {
1226
+ "some": "body"
1227
+ },
1228
+ "headers": {
1229
+ "Bar": "foo",
1230
+ "Foo": "bar"
1231
+ },
1232
+ "method": "POST",
1233
+ "password": "password",
1234
+ "url": "https://webhook",
1235
+ "username": "username"
1236
+ }
1237
+ }
1238
+ }
1239
+ ```
1240
+ Pact Broker will respond with:
1241
+ ```json
1242
+ {
1243
+ "status": 404,
1244
+ "headers": {
1245
+ "Content-Type": "application/hal+json;charset=utf-8"
1246
+ }
1247
+ }
1248
+ ```
1249
+ <a name="a_request_to_create_a_webhook_with_a_JSON_body_and_a_uuid_given_the_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker"></a>
1250
+ Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker**, upon receiving **a request to create a webhook with a JSON body and a uuid** from Pact Broker Client V2, with
1251
+ ```json
1252
+ {
1253
+ "method": "PUT",
1254
+ "path": "/webhooks/696c5f93-1b7f-44bc-8d03-59440fcaa9a0",
1255
+ "headers": {
1256
+ "Accept": "application/hal+json",
1257
+ "Content-Type": "application/json"
1258
+ },
1259
+ "body": {
1260
+ "consumer": {
1261
+ "name": "Condor"
1262
+ },
1263
+ "description": "a webhook",
1264
+ "events": [
1265
+ {
1266
+ "name": "contract_content_changed"
1267
+ }
1268
+ ],
1269
+ "provider": {
1270
+ "name": "Pricing Service"
1271
+ },
1272
+ "request": {
1273
+ "body": {
1274
+ "some": "body"
1275
+ },
1276
+ "headers": {
1277
+ "Bar": "foo",
1278
+ "Foo": "bar"
1279
+ },
1280
+ "method": "POST",
1281
+ "password": "password",
1282
+ "url": "https://webhook",
1283
+ "username": "username"
1284
+ }
1285
+ }
1286
+ }
1287
+ ```
1288
+ Pact Broker will respond with:
1289
+ ```json
1290
+ {
1291
+ "status": 201,
1292
+ "headers": {
1293
+ "Content-Type": "application/hal+json;charset=utf-8"
1294
+ },
1295
+ "body": {
1296
+ "_links": {
1297
+ "self": {
1298
+ "href": "/some-url"
1299
+ }
1300
+ },
1301
+ "description": "a webhook",
1302
+ "events": [
1303
+ {
1304
+ "name": "contract_content_changed"
1305
+ }
1306
+ ],
1307
+ "request": {
1308
+ "body": {
1309
+ "some": "body"
1310
+ }
1311
+ }
1312
+ }
1313
+ }
1314
+ ```
1315
+ <a name="a_request_to_create_a_webhook_with_a_JSON_body_for_a_consumer_given_the_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker"></a>
1316
+ Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker**, upon receiving **a request to create a webhook with a JSON body for a consumer** from Pact Broker Client V2, with
1317
+ ```json
1318
+ {
1319
+ "method": "POST",
1320
+ "path": "/webhooks",
1321
+ "headers": {
1322
+ "Accept": "application/hal+json",
1323
+ "Content-Type": "application/json"
1324
+ },
1325
+ "body": {
1326
+ "consumer": {
1327
+ "name": "Condor"
1328
+ },
1329
+ "description": "a webhook",
1330
+ "events": [
1331
+ {
1332
+ "name": "contract_content_changed"
1333
+ }
1334
+ ],
1335
+ "request": {
1336
+ "body": {
1337
+ "some": "body"
1338
+ },
1339
+ "headers": {
1340
+ "Bar": "foo",
1341
+ "Foo": "bar"
1342
+ },
1343
+ "method": "POST",
1344
+ "password": "password",
1345
+ "url": "https://webhook",
1346
+ "username": "username"
1347
+ }
1348
+ }
1349
+ }
1350
+ ```
1351
+ Pact Broker will respond with:
1352
+ ```json
1353
+ {
1354
+ "status": 201,
1355
+ "headers": {
1356
+ "Content-Type": "application/hal+json;charset=utf-8"
1357
+ },
1358
+ "body": {
1359
+ "_links": {
1360
+ "self": {
1361
+ "href": "/some-url"
1362
+ }
1363
+ },
1364
+ "description": "a webhook",
1365
+ "events": [
1366
+ {
1367
+ "name": "contract_content_changed"
1368
+ }
1369
+ ],
1370
+ "request": {
1371
+ "body": {
1372
+ "some": "body"
1373
+ }
1374
+ }
1375
+ }
1376
+ }
1377
+ ```
1378
+ <a name="a_request_to_create_a_webhook_with_a_JSON_body_for_a_consumer_and_provider_given_the_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker"></a>
1379
+ Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker**, upon receiving **a request to create a webhook with a JSON body for a consumer and provider** from Pact Broker Client V2, with
1380
+ ```json
1381
+ {
1382
+ "method": "POST",
1383
+ "path": "/webhooks/provider/Pricing%20Service/consumer/Condor",
1384
+ "headers": {
1385
+ "Accept": "application/hal+json",
1386
+ "Content-Type": "application/json"
1387
+ },
1388
+ "body": {
1389
+ "description": "a webhook",
1390
+ "events": [
1391
+ {
1392
+ "name": "contract_content_changed"
1393
+ }
1394
+ ],
1395
+ "request": {
1396
+ "body": {
1397
+ "some": "body"
1398
+ },
1399
+ "headers": {
1400
+ "Bar": "foo",
1401
+ "Foo": "bar"
1402
+ },
1403
+ "method": "POST",
1404
+ "password": "password",
1405
+ "url": "https://webhook",
1406
+ "username": "username"
1407
+ }
1408
+ }
1409
+ }
1410
+ ```
1411
+ Pact Broker will respond with:
1412
+ ```json
1413
+ {
1414
+ "status": 201,
1415
+ "headers": {
1416
+ "Content-Type": "application/hal+json;charset=utf-8"
1417
+ },
1418
+ "body": {
1419
+ "_links": {
1420
+ "self": {
1421
+ "href": "/some-url"
1422
+ }
1423
+ },
1424
+ "description": "a webhook",
1425
+ "events": [
1426
+ {
1427
+ "name": "contract_content_changed"
1428
+ }
1429
+ ],
1430
+ "request": {
1431
+ "body": {
1432
+ "some": "body"
1433
+ }
1434
+ }
1435
+ }
1436
+ }
1437
+ ```
1438
+ <a name="a_request_to_create_a_webhook_with_a_JSON_body_for_a_consumer_specified_by_a_label"></a>
1439
+ Upon receiving **a request to create a webhook with a JSON body for a consumer specified by a label** from Pact Broker Client V2, with
1440
+ ```json
1441
+ {
1442
+ "method": "POST",
1443
+ "path": "/webhooks",
1444
+ "headers": {
1445
+ "Accept": "application/hal+json",
1446
+ "Content-Type": "application/json"
1447
+ },
1448
+ "body": {
1449
+ "consumer": {
1450
+ "label": "consumer_label"
1451
+ },
1452
+ "description": "a webhook",
1453
+ "events": [
1454
+ {
1455
+ "name": "contract_content_changed"
1456
+ }
1457
+ ],
1458
+ "request": {
1459
+ "body": {
1460
+ "some": "body"
1461
+ },
1462
+ "headers": {
1463
+ "Bar": "foo",
1464
+ "Foo": "bar"
1465
+ },
1466
+ "method": "POST",
1467
+ "password": "password",
1468
+ "url": "https://webhook",
1469
+ "username": "username"
1470
+ }
1471
+ }
1472
+ }
1473
+ ```
1474
+ Pact Broker will respond with:
1475
+ ```json
1476
+ {
1477
+ "status": 201,
1478
+ "headers": {
1479
+ "Content-Type": "application/hal+json;charset=utf-8"
1480
+ },
1481
+ "body": {
1482
+ "_links": {
1483
+ "self": {
1484
+ "href": "/some-url"
1485
+ }
1486
+ },
1487
+ "description": "a webhook",
1488
+ "events": [
1489
+ {
1490
+ "name": "contract_content_changed"
1491
+ }
1492
+ ],
1493
+ "request": {
1494
+ "body": {
1495
+ "some": "body"
1496
+ }
1497
+ }
1498
+ }
1499
+ }
1500
+ ```
1501
+ <a name="a_request_to_create_a_webhook_with_a_JSON_body_for_a_consumer_that_does_not_exist"></a>
1502
+ Upon receiving **a request to create a webhook with a JSON body for a consumer that does not exist** from Pact Broker Client V2, with
1503
+ ```json
1504
+ {
1505
+ "method": "POST",
1506
+ "path": "/webhooks",
1507
+ "headers": {
1508
+ "Accept": "application/hal+json",
1509
+ "Content-Type": "application/json"
1510
+ },
1511
+ "body": {
1512
+ "consumer": {
1513
+ "name": "Condor"
1514
+ },
1515
+ "description": "a webhook",
1516
+ "events": [
1517
+ {
1518
+ "name": "contract_content_changed"
1519
+ }
1520
+ ],
1521
+ "request": {
1522
+ "body": {
1523
+ "some": "body"
1524
+ },
1525
+ "headers": {
1526
+ "Bar": "foo",
1527
+ "Foo": "bar"
1528
+ },
1529
+ "method": "POST",
1530
+ "password": "password",
1531
+ "url": "https://webhook",
1532
+ "username": "username"
1533
+ }
1534
+ }
1535
+ }
1536
+ ```
1537
+ Pact Broker will respond with:
1538
+ ```json
1539
+ {
1540
+ "status": 400,
1541
+ "headers": {
1542
+ "Content-Type": "application/hal+json;charset=utf-8"
1543
+ },
1544
+ "body": {
1545
+ "errors": {
1546
+ "consumer.name": [
1547
+ "Some error"
1548
+ ]
1549
+ }
1550
+ }
1551
+ }
1552
+ ```
1553
+ <a name="a_request_to_create_a_webhook_with_a_JSON_body_for_a_provider_given_the_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker"></a>
1554
+ Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker**, upon receiving **a request to create a webhook with a JSON body for a provider** from Pact Broker Client V2, with
1555
+ ```json
1556
+ {
1557
+ "method": "POST",
1558
+ "path": "/webhooks",
1559
+ "headers": {
1560
+ "Accept": "application/hal+json",
1561
+ "Content-Type": "application/json"
1562
+ },
1563
+ "body": {
1564
+ "description": "a webhook",
1565
+ "events": [
1566
+ {
1567
+ "name": "contract_content_changed"
1568
+ }
1569
+ ],
1570
+ "provider": {
1571
+ "name": "Pricing Service"
1572
+ },
1573
+ "request": {
1574
+ "body": {
1575
+ "some": "body"
1576
+ },
1577
+ "headers": {
1578
+ "Bar": "foo",
1579
+ "Foo": "bar"
1580
+ },
1581
+ "method": "POST",
1582
+ "password": "password",
1583
+ "url": "https://webhook",
1584
+ "username": "username"
1585
+ }
1586
+ }
1587
+ }
1588
+ ```
1589
+ Pact Broker will respond with:
1590
+ ```json
1591
+ {
1592
+ "status": 201,
1593
+ "headers": {
1594
+ "Content-Type": "application/hal+json;charset=utf-8"
1595
+ },
1596
+ "body": {
1597
+ "_links": {
1598
+ "self": {
1599
+ "href": "/some-url"
1600
+ }
1601
+ },
1602
+ "description": "a webhook",
1603
+ "events": [
1604
+ {
1605
+ "name": "contract_content_changed"
1606
+ }
1607
+ ],
1608
+ "request": {
1609
+ "body": {
1610
+ "some": "body"
1611
+ }
1612
+ }
1613
+ }
1614
+ }
1615
+ ```
1616
+ <a name="a_request_to_create_a_webhook_with_a_JSON_body_for_a_provider_specified_by_a_label"></a>
1617
+ Upon receiving **a request to create a webhook with a JSON body for a provider specified by a label** from Pact Broker Client V2, with
1618
+ ```json
1619
+ {
1620
+ "method": "POST",
1621
+ "path": "/webhooks",
1622
+ "headers": {
1623
+ "Accept": "application/hal+json",
1624
+ "Content-Type": "application/json"
1625
+ },
1626
+ "body": {
1627
+ "description": "a webhook",
1628
+ "events": [
1629
+ {
1630
+ "name": "contract_content_changed"
1631
+ }
1632
+ ],
1633
+ "provider": {
1634
+ "label": "provider_label"
1635
+ },
1636
+ "request": {
1637
+ "body": {
1638
+ "some": "body"
1639
+ },
1640
+ "headers": {
1641
+ "Bar": "foo",
1642
+ "Foo": "bar"
1643
+ },
1644
+ "method": "POST",
1645
+ "password": "password",
1646
+ "url": "https://webhook",
1647
+ "username": "username"
1648
+ }
1649
+ }
1650
+ }
1651
+ ```
1652
+ Pact Broker will respond with:
1653
+ ```json
1654
+ {
1655
+ "status": 201,
1656
+ "headers": {
1657
+ "Content-Type": "application/hal+json;charset=utf-8"
1658
+ },
1659
+ "body": {
1660
+ "_links": {
1661
+ "self": {
1662
+ "href": "/some-url"
1663
+ }
1664
+ },
1665
+ "description": "a webhook",
1666
+ "events": [
1667
+ {
1668
+ "name": "contract_content_changed"
1669
+ }
1670
+ ],
1671
+ "request": {
1672
+ "body": {
1673
+ "some": "body"
1674
+ }
1675
+ }
1676
+ }
1677
+ }
1678
+ ```
1679
+ <a name="a_request_to_create_a_webhook_with_a_non-JSON_body_for_a_consumer_and_provider_given_the_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker"></a>
1680
+ Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker**, upon receiving **a request to create a webhook with a non-JSON body for a consumer and provider** from Pact Broker Client V2, with
1681
+ ```json
1682
+ {
1683
+ "method": "POST",
1684
+ "path": "/webhooks/provider/Pricing%20Service/consumer/Condor",
1685
+ "headers": {
1686
+ "Accept": "application/hal+json",
1687
+ "Content-Type": "application/json"
1688
+ },
1689
+ "body": {
1690
+ "description": "a webhook",
1691
+ "events": [
1692
+ {
1693
+ "name": "contract_content_changed"
1694
+ }
1695
+ ],
1696
+ "request": {
1697
+ "body": "<xml></xml>",
1698
+ "headers": {
1699
+ "Bar": "foo",
1700
+ "Foo": "bar"
1701
+ },
1702
+ "method": "POST",
1703
+ "password": "password",
1704
+ "url": "https://webhook",
1705
+ "username": "username"
1706
+ }
1707
+ }
1708
+ }
1709
+ ```
1710
+ Pact Broker will respond with:
1711
+ ```json
1712
+ {
1713
+ "status": 201,
1714
+ "headers": {
1715
+ "Content-Type": "application/hal+json;charset=utf-8"
1716
+ },
1717
+ "body": {
1718
+ "_links": {
1719
+ "self": {
1720
+ "href": "/some-url"
1721
+ }
1722
+ },
1723
+ "description": "a webhook",
1724
+ "events": [
1725
+ {
1726
+ "name": "contract_content_changed"
1727
+ }
1728
+ ],
1729
+ "request": {
1730
+ "body": "<xml></xml>"
1731
+ }
1732
+ }
1733
+ }
1734
+ ```
1735
+ <a name="a_request_to_create_a_webhook_with_every_possible_event_type_given_the_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker"></a>
1736
+ Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker**, upon receiving **a request to create a webhook with every possible event type** from Pact Broker Client V2, with
1737
+ ```json
1738
+ {
1739
+ "method": "POST",
1740
+ "path": "/webhooks/provider/Pricing%20Service/consumer/Condor",
1741
+ "headers": {
1742
+ "Accept": "application/hal+json",
1743
+ "Content-Type": "application/json"
1744
+ },
1745
+ "body": {
1746
+ "description": "a webhook",
1747
+ "events": [
1748
+ {
1749
+ "name": "contract_content_changed"
1750
+ },
1751
+ {
1752
+ "name": "contract_published"
1753
+ },
1754
+ {
1755
+ "name": "provider_verification_published"
1756
+ },
1757
+ {
1758
+ "name": "provider_verification_succeeded"
1759
+ },
1760
+ {
1761
+ "name": "provider_verification_failed"
1762
+ }
1763
+ ],
1764
+ "request": {
1765
+ "body": {
1766
+ "some": "body"
1767
+ },
1768
+ "headers": {
1769
+ "Bar": "foo",
1770
+ "Foo": "bar"
1771
+ },
1772
+ "method": "POST",
1773
+ "password": "password",
1774
+ "url": "https://webhook",
1775
+ "username": "username"
1776
+ }
1777
+ }
1778
+ }
1779
+ ```
1780
+ Pact Broker will respond with:
1781
+ ```json
1782
+ {
1783
+ "status": 201,
1784
+ "headers": {
1785
+ "Content-Type": "application/hal+json;charset=utf-8"
1786
+ },
1787
+ "body": {
1788
+ "_links": {
1789
+ "self": {
1790
+ "href": "/some-url"
1791
+ }
1792
+ },
1793
+ "description": "a webhook",
1794
+ "events": [
1795
+ {
1796
+ "name": "contract_content_changed"
1797
+ },
1798
+ {
1799
+ "name": "contract_published"
1800
+ },
1801
+ {
1802
+ "name": "provider_verification_published"
1803
+ },
1804
+ {
1805
+ "name": "provider_verification_succeeded"
1806
+ },
1807
+ {
1808
+ "name": "provider_verification_failed"
1809
+ }
1810
+ ],
1811
+ "request": {
1812
+ "body": {
1813
+ "some": "body"
1814
+ }
1815
+ }
1816
+ }
1817
+ }
1818
+ ```
1819
+ <a name="a_request_to_create_an_environment"></a>
1820
+ Upon receiving **a request to create an environment** from Pact Broker Client V2, with
1821
+ ```json
1822
+ {
1823
+ "method": "POST",
1824
+ "path": "/environments",
1825
+ "headers": {
1826
+ "Accept": "application/hal+json",
1827
+ "Content-Type": "application/json"
1828
+ },
1829
+ "body": {
1830
+ "contacts": [
1831
+ {
1832
+ "details": {
1833
+ "emailAddress": "foo@bar.com"
1834
+ },
1835
+ "name": "Foo team"
1836
+ }
1837
+ ],
1838
+ "displayName": "Test",
1839
+ "name": "test",
1840
+ "production": false
1841
+ }
1842
+ }
1843
+ ```
1844
+ Pact Broker will respond with:
1845
+ ```json
1846
+ {
1847
+ "status": 201,
1848
+ "headers": {
1849
+ "Content-Type": "application/hal+json;charset=utf-8"
1850
+ },
1851
+ "body": {
1852
+ "contacts": [
1853
+ {
1854
+ "details": {
1855
+ "emailAddress": "foo@bar.com"
1856
+ },
1857
+ "name": "Foo team"
1858
+ }
1859
+ ],
1860
+ "displayName": "Test",
1861
+ "name": "test",
1862
+ "production": false,
1863
+ "uuid": "ffe683ef-dcd7-4e4f-877d-f6eb3db8e86e"
1864
+ }
1865
+ }
1866
+ ```
1867
+ <a name="a_request_to_delete_a_pacticipant_branch_given_a_branch_named_main_exists_for_pacticipant_Foo"></a>
1868
+ Given **a branch named main exists for pacticipant Foo**, upon receiving **a request to delete a pacticipant branch** from Pact Broker Client V2, with
1869
+ ```json
1870
+ {
1871
+ "method": "DELETE",
1872
+ "path": "/pacticipants/Foo/branches/main"
1873
+ }
1874
+ ```
1875
+ Pact Broker will respond with:
1876
+ ```json
1877
+ {
1878
+ "status": 204
1879
+ }
1880
+ ```
1881
+ <a name="a_request_to_determine_if_Bar_can_be_deployed_with_all_Foo_tagged_prod,_ignoring_the_verification_for_Foo_version_3.4.5_given_provider_Bar_version_4.5.6_has_a_successful_verification_for_Foo_version_1.2.3_tagged_prod_and_a_failed_verification_for_version_3.4.5_tagged_prod"></a>
1882
+ Given **provider Bar version 4.5.6 has a successful verification for Foo version 1.2.3 tagged prod and a failed verification for version 3.4.5 tagged prod**, upon receiving **a request to determine if Bar can be deployed with all Foo tagged prod, ignoring the verification for Foo version 3.4.5** from Pact Broker Client V2, with
1883
+ ```json
1884
+ {
1885
+ "method": "GET",
1886
+ "path": "/matrix",
1887
+ "query": "ignore[][pacticipant]=Foo&ignore[][version]=3%2e4%2e5&latestby=cvpv&q[][pacticipant]=Bar&q[][pacticipant]=Foo&q[][tag]=prod&q[][version]=4%2e5%2e6"
1888
+ }
1889
+ ```
1890
+ Pact Broker will respond with:
1891
+ ```json
1892
+ {
1893
+ "status": 200,
1894
+ "headers": {
1895
+ "Content-Type": "application/hal+json;charset=utf-8"
1896
+ },
1897
+ "body": {
1898
+ "matrix": [
1899
+ {
1900
+ "consumer": {
1901
+ "name": "Foo",
1902
+ "version": {
1903
+ "number": "1.2.3"
1904
+ }
1905
+ },
1906
+ "provider": {
1907
+ "name": "Bar",
1908
+ "version": {
1909
+ "number": "4.5.6"
1910
+ }
1911
+ },
1912
+ "verificationResult": {
1913
+ "_links": {
1914
+ "self": {
1915
+ "href": "http://result"
1916
+ }
1917
+ },
1918
+ "success": true
1919
+ }
1920
+ },
1921
+ {
1922
+ "consumer": {
1923
+ "name": "Foo",
1924
+ "version": {
1925
+ "number": "3.4.5"
1926
+ }
1927
+ },
1928
+ "ignored": true,
1929
+ "provider": {
1930
+ "name": "Bar",
1931
+ "version": {
1932
+ "number": "4.5.6"
1933
+ }
1934
+ },
1935
+ "verificationResult": {
1936
+ "_links": {
1937
+ "self": {
1938
+ "href": "http://result"
1939
+ }
1940
+ },
1941
+ "success": false
1942
+ }
1943
+ }
1944
+ ],
1945
+ "notices": [
1946
+ {
1947
+ "text": "some notice",
1948
+ "type": "info"
1949
+ }
1950
+ ],
1951
+ "summary": {
1952
+ "deployable": true,
1953
+ "ignored": 1
1954
+ }
1955
+ }
1956
+ }
1957
+ ```
1958
+ <a name="a_request_to_get_the_Pricing_Service_given_the_&#39;Pricing_Service&#39;_already_exists_in_the_pact-broker"></a>
1959
+ Given **the 'Pricing Service' already exists in the pact-broker**, upon receiving **a request to get the Pricing Service** from Pact Broker Client V2, with
1960
+ ```json
1961
+ {
1962
+ "method": "GET",
1963
+ "path": "/pacticipants/Pricing%20Service"
1964
+ }
1965
+ ```
1966
+ Pact Broker will respond with:
1967
+ ```json
1968
+ {
1969
+ "status": 200,
1970
+ "headers": {
1971
+ "Content-Type": "application/hal+json"
1972
+ },
1973
+ "body": {
1974
+ "_embedded": {
1975
+ "latest-version": {
1976
+ "_links": {
1977
+ "self": {
1978
+ "href": "http://example.org/pacticipants/Pricing%20Service/versions/1.3.0"
1979
+ }
1980
+ },
1981
+ "number": "1.3.0"
1982
+ }
1983
+ },
1984
+ "_links": {
1985
+ "self": {
1986
+ "href": "http://example.org/pacticipants/Pricing%20Service"
1987
+ },
1988
+ "versions": {
1989
+ "href": "http://example.org/pacticipants/Pricing%20Service/versions"
1990
+ }
1991
+ },
1992
+ "name": "Pricing Service",
1993
+ "repositoryUrl": "git@git.realestate.com.au:business-systems/pricing-service"
1994
+ }
1995
+ }
1996
+ ```
1997
+ <a name="a_request_to_get_the_Pricing_Service_given_the_&#39;Pricing_Service&#39;_does_not_exist_in_the_pact-broker"></a>
1998
+ Given **the 'Pricing Service' does not exist in the pact-broker**, upon receiving **a request to get the Pricing Service** from Pact Broker Client V2, with
1999
+ ```json
2000
+ {
2001
+ "method": "GET",
2002
+ "path": "/pacticipants/Pricing%20Service"
2003
+ }
2004
+ ```
2005
+ Pact Broker will respond with:
2006
+ ```json
2007
+ {
2008
+ "status": 404
2009
+ }
2010
+ ```
2011
+ <a name="a_request_to_list_pacticipants_given_&#39;Condor&#39;_exists_in_the_pact-broker"></a>
2012
+ Given **'Condor' exists in the pact-broker**, upon receiving **a request to list pacticipants** from Pact Broker Client V2, with
2013
+ ```json
2014
+ {
2015
+ "method": "GET",
2016
+ "path": "/pacticipants"
2017
+ }
2018
+ ```
2019
+ Pact Broker will respond with:
2020
+ ```json
2021
+ {
2022
+ "status": 200,
2023
+ "headers": {
2024
+ "Content-Type": "application/hal+json"
2025
+ },
2026
+ "body": {
2027
+ "_links": {
2028
+ "pacticipants": [
2029
+ {
2030
+ "href": "http://example.org/pacticipants/Condor",
2031
+ "title": "Condor"
2032
+ }
2033
+ ],
2034
+ "self": {
2035
+ "href": "http://example.org/pacticipants"
2036
+ }
2037
+ },
2038
+ "pacticipants": [
2039
+ {
2040
+ "_embedded": {
2041
+ "latest-version": {
2042
+ "_links": {
2043
+ "self": {
2044
+ "href": "http://example.org/pacticipants/Condor/versions/1.3.0"
2045
+ }
2046
+ },
2047
+ "number": "1.3.0"
2048
+ }
2049
+ },
2050
+ "_links": {
2051
+ "self": {
2052
+ "href": "http://example.org/pacticipants/Condor"
2053
+ }
2054
+ },
2055
+ "name": "Condor"
2056
+ }
2057
+ ]
2058
+ }
2059
+ }
2060
+ ```
2061
+ <a name="a_request_to_list_the_environments_given_an_environment_exists"></a>
2062
+ Given **an environment exists**, upon receiving **a request to list the environments** from Pact Broker Client V2, with
2063
+ ```json
2064
+ {
2065
+ "method": "GET",
2066
+ "path": "/environments",
2067
+ "headers": {
2068
+ "Accept": "application/hal+json"
2069
+ }
2070
+ }
2071
+ ```
2072
+ Pact Broker will respond with:
2073
+ ```json
2074
+ {
2075
+ "status": 200,
2076
+ "headers": {
2077
+ "Content-Type": "application/hal+json;charset=utf-8"
2078
+ },
2079
+ "body": {
2080
+ "_embedded": {
2081
+ "environments": [
2082
+ {
2083
+ "contacts": [
2084
+ {
2085
+ "details": {
2086
+ "emailAddress": "foo@bar.com"
2087
+ },
2088
+ "name": "Foo team"
2089
+ }
2090
+ ],
2091
+ "displayName": "Test",
2092
+ "name": "test",
2093
+ "production": false,
2094
+ "uuid": "78e85fb2-9df1-48da-817e-c9bea6294e01"
2095
+ }
2096
+ ]
2097
+ }
2098
+ }
2099
+ }
2100
+ ```
2101
+ <a name="a_request_to_list_the_latest_pacts_given_a_pact_between_Condor_and_the_Pricing_Service_exists"></a>
2102
+ Given **a pact between Condor and the Pricing Service exists**, upon receiving **a request to list the latest pacts** from Pact Broker Client V2, with
2103
+ ```json
2104
+ {
2105
+ "method": "GET",
2106
+ "path": "/pacts/latest"
2107
+ }
2108
+ ```
2109
+ Pact Broker will respond with:
2110
+ ```json
2111
+ {
2112
+ "status": 200,
2113
+ "headers": {
2114
+ "Content-Type": "application/hal+json"
2115
+ },
2116
+ "body": {
2117
+ "_links": {
2118
+ "self": {
2119
+ "href": "http://example.org/pacts/latest"
2120
+ }
2121
+ },
2122
+ "pacts": [
2123
+ {
2124
+ "_embedded": {
2125
+ "consumer": {
2126
+ "_embedded": {
2127
+ "version": {
2128
+ "number": "1.3.0"
2129
+ }
2130
+ },
2131
+ "_links": {
2132
+ "self": {
2133
+ "href": "http://example.org/pacticipants/Condor"
2134
+ }
2135
+ },
2136
+ "name": "Condor"
2137
+ },
2138
+ "provider": {
2139
+ "_links": {
2140
+ "self": {
2141
+ "href": "http://example.org/pacticipants/Pricing%20Service"
2142
+ }
2143
+ },
2144
+ "name": "Pricing Service"
2145
+ }
2146
+ },
2147
+ "_links": {
2148
+ "self": [
2149
+ {
2150
+ "href": "http://example.org/pacts/provider/Pricing%20Service/consumer/Condor/latest"
2151
+ },
2152
+ {
2153
+ "href": "http://example.org/pacts/provider/Pricing%20Service/consumer/Condor/version/1.3.0"
2154
+ }
2155
+ ]
2156
+ }
2157
+ }
2158
+ ]
2159
+ }
2160
+ }
2161
+ ```
2162
+ <a name="a_request_to_list_the_versions_deployed_to_an_environment_for_a_pacticipant_name_and_application_instance_given_an_version_is_deployed_to_environment_with_UUID_16926ef3-590f-4e3f-838e-719717aa88c9_with_target_customer-1"></a>
2163
+ Given **an version is deployed to environment with UUID 16926ef3-590f-4e3f-838e-719717aa88c9 with target customer-1**, upon receiving **a request to list the versions deployed to an environment for a pacticipant name and application instance** from Pact Broker Client V2, with
2164
+ ```json
2165
+ {
2166
+ "method": "GET",
2167
+ "path": "/environments/16926ef3-590f-4e3f-838e-719717aa88c9/deployed-versions/currently-deployed",
2168
+ "query": "pacticipant=Foo",
2169
+ "headers": {
2170
+ "Accept": "application/hal+json"
2171
+ }
2172
+ }
2173
+ ```
2174
+ Pact Broker will respond with:
2175
+ ```json
2176
+ {
2177
+ "status": 200,
2178
+ "headers": {
2179
+ "Content-Type": "application/hal+json;charset=utf-8"
2180
+ },
2181
+ "body": {
2182
+ "_embedded": {
2183
+ "deployedVersions": [
2184
+ {
2185
+ "_links": {
2186
+ "self": {
2187
+ "href": "/deployed-versions/ff3adecf-cfc5-4653-a4e3-f1861092f8e0"
2188
+ }
2189
+ },
2190
+ "applicationInstance": "customer-1"
2191
+ }
2192
+ ]
2193
+ }
2194
+ }
2195
+ }
2196
+ ```
2197
+ <a name="a_request_to_mark_a_deployed_version_as_not_currently_deploye_given_a_currently_deployed_version_exists"></a>
2198
+ Given **a currently deployed version exists**, upon receiving **a request to mark a deployed version as not currently deploye** from Pact Broker Client V2, with
2199
+ ```json
2200
+ {
2201
+ "method": "PATCH",
2202
+ "path": "/deployed-versions/ff3adecf-cfc5-4653-a4e3-f1861092f8e0",
2203
+ "headers": {
2204
+ "Content-Type": "application/merge-patch+json"
2205
+ },
2206
+ "body": {
2207
+ "currentlyDeployed": false
2208
+ }
2209
+ }
2210
+ ```
2211
+ Pact Broker will respond with:
2212
+ ```json
2213
+ {
2214
+ "status": 200,
2215
+ "headers": {
2216
+ "Content-Type": "application/hal+json;charset=utf-8"
2217
+ },
2218
+ "body": {
2219
+ "_embedded": {
2220
+ "version": {
2221
+ "number": "2"
2222
+ }
2223
+ },
2224
+ "currentlyDeployed": false
2225
+ }
2226
+ }
2227
+ ```
2228
+ <a name="a_request_to_publish_contracts"></a>
2229
+ Upon receiving **a request to publish contracts** from Pact Broker Client V2, with
2230
+ ```json
2231
+ {
2232
+ "method": "POST",
2233
+ "path": "/contracts/publish",
2234
+ "headers": {
2235
+ "Accept": "application/hal+json",
2236
+ "Content-Type": "application/json"
2237
+ },
2238
+ "body": {
2239
+ "branch": "main",
2240
+ "buildUrl": "http://build",
2241
+ "contracts": [
2242
+ {
2243
+ "consumerName": "Foo",
2244
+ "content": "eyJjb25zdW1lciI6eyJuYW1lIjoiRm9vIn0sInByb3ZpZGVyIjp7Im5hbWUiOiJCYXIifSwiaW50ZXJhY3Rpb25zIjpbeyJkZXNjcmlwdGlvbiI6ImFuIGV4YW1wbGUgcmVxdWVzdCIsInByb3ZpZGVyU3RhdGUiOiJhIHByb3ZpZGVyIHN0YXRlIiwicmVxdWVzdCI6eyJtZXRob2QiOiJHRVQiLCJwYXRoIjoiLyIsImhlYWRlcnMiOnt9fSwicmVzcG9uc2UiOnsic3RhdHVzIjoyMDAsImhlYWRlcnMiOnsiQ29udGVudC1UeXBlIjoiYXBwbGljYXRpb24vaGFsK2pzb24ifX19XSwibWV0YWRhdGEiOnsicGFjdFNwZWNpZmljYXRpb24iOnsidmVyc2lvbiI6IjIuMC4wIn19fQ==",
2245
+ "contentType": "application/json",
2246
+ "onConflict": "merge",
2247
+ "providerName": "Bar",
2248
+ "specification": "pact"
2249
+ }
2250
+ ],
2251
+ "pacticipantName": "Foo",
2252
+ "pacticipantVersionNumber": "5556b8149bf8bac76bc30f50a8a2dd4c22c85f30",
2253
+ "tags": [
2254
+ "dev"
2255
+ ]
2256
+ }
2257
+ }
2258
+ ```
2259
+ Pact Broker will respond with:
2260
+ ```json
2261
+ {
2262
+ "status": 200,
2263
+ "headers": {
2264
+ "Content-Type": "application/hal+json;charset=utf-8"
2265
+ },
2266
+ "body": {
2267
+ "_embedded": {
2268
+ "pacticipant": {
2269
+ "name": "Foo"
2270
+ },
2271
+ "version": {
2272
+ "number": "5556b8149bf8bac76bc30f50a8a2dd4c22c85f30"
2273
+ }
2274
+ },
2275
+ "_links": {
2276
+ "pb:contracts": [
2277
+ {
2278
+ "href": "http://some-pact"
2279
+ }
2280
+ ],
2281
+ "pb:pacticipant-version-tags": [
2282
+ {
2283
+ "name": "dev"
2284
+ }
2285
+ ]
2286
+ },
2287
+ "logs": [
2288
+ {
2289
+ "level": "info",
2290
+ "message": "some message"
2291
+ }
2292
+ ]
2293
+ }
2294
+ }
2295
+ ```
2296
+ <a name="a_request_to_record_a_deployment_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment"></a>
2297
+ Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment**, upon receiving **a request to record a deployment** from Pact Broker Client V2, with
2298
+ ```json
2299
+ {
2300
+ "method": "POST",
2301
+ "path": "/pacticipants/Foo/versions/5556b8149bf8bac76bc30f50a8a2dd4c22c85f30/deployed-versions/environment/cb632df3-0a0d-4227-aac3-60114dd36479",
2302
+ "headers": {
2303
+ "Accept": "application/hal+json",
2304
+ "Content-Type": "application/json"
2305
+ },
2306
+ "body": {
2307
+ "applicationInstance": "blue",
2308
+ "target": "blue"
2309
+ }
2310
+ }
2311
+ ```
2312
+ Pact Broker will respond with:
2313
+ ```json
2314
+ {
2315
+ "status": 201,
2316
+ "headers": {
2317
+ "Content-Type": "application/hal+json;charset=utf-8"
2318
+ },
2319
+ "body": {
2320
+ "target": "blue"
2321
+ }
2322
+ }
2323
+ ```
2324
+ <a name="a_request_to_record_a_release_given_version_5556b8149bf8bac76bc30f50a8a2dd4c22c85f30_of_pacticipant_Foo_exists_with_a_test_environment_available_for_deployment"></a>
2325
+ Given **version 5556b8149bf8bac76bc30f50a8a2dd4c22c85f30 of pacticipant Foo exists with a test environment available for deployment**, upon receiving **a request to record a release** from Pact Broker Client V2, with
2326
+ ```json
2327
+ {
2328
+ "method": "POST",
2329
+ "path": "/pacticipants/Foo/versions/5556b8149bf8bac76bc30f50a8a2dd4c22c85f30/released-versions/environment/cb632df3-0a0d-4227-aac3-60114dd36479",
2330
+ "headers": {
2331
+ "Accept": "application/hal+json",
2332
+ "Content-Type": "application/json"
2333
+ },
2334
+ "body": {
2335
+ }
2336
+ }
2337
+ ```
2338
+ Pact Broker will respond with:
2339
+ ```json
2340
+ {
2341
+ "status": 201,
2342
+ "headers": {
2343
+ "Content-Type": "application/hal+json;charset=utf-8"
2344
+ }
2345
+ }
2346
+ ```
2347
+ <a name="a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_&#39;Pricing_Service&#39;_already_exists_in_the_pact-broker"></a>
2348
+ Given **the 'Pricing Service' already exists in the pact-broker**, upon receiving **a request to register the repository URL of a pacticipant** from Pact Broker Client V2, with
2349
+ ```json
2350
+ {
2351
+ "method": "PATCH",
2352
+ "path": "/pacticipants/Pricing%20Service",
2353
+ "headers": {
2354
+ "Content-Type": "application/json"
2355
+ },
2356
+ "body": {
2357
+ "repository_url": "git@git.realestate.com.au:business-systems/pricing-service"
2358
+ }
2359
+ }
2360
+ ```
2361
+ Pact Broker will respond with:
2362
+ ```json
2363
+ {
2364
+ "status": 200,
2365
+ "headers": {
2366
+ "Content-Type": "application/hal+json;charset=utf-8"
2367
+ }
2368
+ }
2369
+ ```
2370
+ <a name="a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_&#39;Pricing_Service&#39;_does_not_exist_in_the_pact-broker"></a>
2371
+ Given **the 'Pricing Service' does not exist in the pact-broker**, upon receiving **a request to register the repository URL of a pacticipant** from Pact Broker Client V2, with
2372
+ ```json
2373
+ {
2374
+ "method": "PATCH",
2375
+ "path": "/pacticipants/Pricing%20Service",
2376
+ "headers": {
2377
+ "Content-Type": "application/json"
2378
+ },
2379
+ "body": {
2380
+ "repository_url": "git@git.realestate.com.au:business-systems/pricing-service"
2381
+ }
2382
+ }
2383
+ ```
2384
+ Pact Broker will respond with:
2385
+ ```json
2386
+ {
2387
+ "status": 201,
2388
+ "headers": {
2389
+ "Content-Type": "application/hal+json;charset=utf-8"
2390
+ }
2391
+ }
2392
+ ```
2393
+ <a name="a_request_to_retrieve_a_pacticipant_given_a_pacticipant_with_name_Foo_exists"></a>
2394
+ Given **a pacticipant with name Foo exists**, upon receiving **a request to retrieve a pacticipant** from Pact Broker Client V2, with
2395
+ ```json
2396
+ {
2397
+ "method": "GET",
2398
+ "path": "/pacticipants/Foo",
2399
+ "headers": {
2400
+ "Accept": "application/hal+json"
2401
+ }
2402
+ }
2403
+ ```
2404
+ Pact Broker will respond with:
2405
+ ```json
2406
+ {
2407
+ "status": 200,
2408
+ "headers": {
2409
+ "Content-Type": "application/hal+json;charset=utf-8"
2410
+ },
2411
+ "body": {
2412
+ "_links": {
2413
+ "self": {
2414
+ "href": "/pacticipants/Foo"
2415
+ }
2416
+ }
2417
+ }
2418
+ }
2419
+ ```
2420
+ <a name="a_request_to_retrieve_a_pacticipant"></a>
2421
+ Upon receiving **a request to retrieve a pacticipant** from Pact Broker Client V2, with
2422
+ ```json
2423
+ {
2424
+ "method": "GET",
2425
+ "path": "/pacticipants/Foo",
2426
+ "headers": {
2427
+ "Accept": "application/hal+json"
2428
+ }
2429
+ }
2430
+ ```
2431
+ Pact Broker will respond with:
2432
+ ```json
2433
+ {
2434
+ "status": 404
2435
+ }
2436
+ ```
2437
+ <a name="a_request_to_retrieve_the_latest_&#39;production&#39;_version_of_Condor_given_&#39;Condor&#39;_exists_in_the_pact-broker_with_the_latest_tagged_&#39;production&#39;_version_1.2.3"></a>
2438
+ Given **'Condor' exists in the pact-broker with the latest tagged 'production' version 1.2.3**, upon receiving **a request to retrieve the latest 'production' version of Condor** from Pact Broker Client V2, with
2439
+ ```json
2440
+ {
2441
+ "method": "GET",
2442
+ "path": "/pacticipants/Condor/latest-version/production",
2443
+ "headers": {
2444
+ "Accept": "application/hal+json, application/json"
2445
+ }
2446
+ }
2447
+ ```
2448
+ Pact Broker will respond with:
2449
+ ```json
2450
+ {
2451
+ "status": 200,
2452
+ "headers": {
2453
+ "Content-Type": "application/hal+json;charset=utf-8"
2454
+ },
2455
+ "body": {
2456
+ "_links": {
2457
+ "self": {
2458
+ "href": "/some-url"
2459
+ }
2460
+ },
2461
+ "number": "1.2.3"
2462
+ }
2463
+ }
2464
+ ```
2465
+ <a name="a_request_to_retrieve_the_latest_pact_between_Condor_and_the_Pricing_Service_given_a_pact_between_Condor_and_the_Pricing_Service_exists"></a>
2466
+ Given **a pact between Condor and the Pricing Service exists**, upon receiving **a request to retrieve the latest pact between Condor and the Pricing Service** from Pact Broker Client V2, with
2467
+ ```json
2468
+ {
2469
+ "method": "GET",
2470
+ "path": "/pacts/provider/Pricing%20Service/consumer/Condor/latest"
2471
+ }
2472
+ ```
2473
+ Pact Broker will respond with:
2474
+ ```json
2475
+ {
2476
+ "status": 200,
2477
+ "headers": {
2478
+ "Content-Type": "application/hal+json",
2479
+ "X-Pact-Consumer-Version": "1.3.0"
2480
+ },
2481
+ "body": {
2482
+ "consumer": {
2483
+ "name": "Condor"
2484
+ },
2485
+ "interactions": [
2486
+ ],
2487
+ "provider": {
2488
+ "name": "Pricing Service"
2489
+ }
2490
+ }
2491
+ }
2492
+ ```
2493
+ <a name="a_request_to_retrieve_the_latest_pact_between_Condor_and_the_Pricing_Service_given_no_pact_between_Condor_and_the_Pricing_Service_exists"></a>
2494
+ Given **no pact between Condor and the Pricing Service exists**, upon receiving **a request to retrieve the latest pact between Condor and the Pricing Service** from Pact Broker Client V2, with
2495
+ ```json
2496
+ {
2497
+ "method": "GET",
2498
+ "path": "/pacts/provider/Pricing%20Service/consumer/Condor/latest"
2499
+ }
2500
+ ```
2501
+ Pact Broker will respond with:
2502
+ ```json
2503
+ {
2504
+ "status": 404
2505
+ }
2506
+ ```
2507
+ <a name="a_request_to_retrieve_the_latest_version_of_Condor_given_&#39;Condor&#39;_exists_in_the_pact-broker_with_the_latest_version_1.2.3"></a>
2508
+ Given **'Condor' exists in the pact-broker with the latest version 1.2.3**, upon receiving **a request to retrieve the latest version of Condor** from Pact Broker Client V2, with
2509
+ ```json
2510
+ {
2511
+ "method": "GET",
2512
+ "path": "/pacticipants/Condor/latest-version",
2513
+ "headers": {
2514
+ "Accept": "application/hal+json, application/json"
2515
+ }
2516
+ }
2517
+ ```
2518
+ Pact Broker will respond with:
2519
+ ```json
2520
+ {
2521
+ "status": 200,
2522
+ "headers": {
2523
+ "Content-Type": "application/hal+json;charset=utf-8"
2524
+ },
2525
+ "body": {
2526
+ "_links": {
2527
+ "self": {
2528
+ "href": "/some-url"
2529
+ }
2530
+ },
2531
+ "number": "1.2.3"
2532
+ }
2533
+ }
2534
+ ```
2535
+ <a name="a_request_to_retrieve_the_pact_between_the_production_verison_of_Condor_and_the_Pricing_Service_given_a_pact_between_Condor_and_the_Pricing_Service_exists_for_the_production_version_of_Condor"></a>
2536
+ Given **a pact between Condor and the Pricing Service exists for the production version of Condor**, upon receiving **a request to retrieve the pact between the production verison of Condor and the Pricing Service** from Pact Broker Client V2, with
2537
+ ```json
2538
+ {
2539
+ "method": "GET",
2540
+ "path": "/pacts/provider/Pricing%20Service/consumer/Condor/latest/prod",
2541
+ "headers": {
2542
+ "Accept": "application/hal+json, application/json"
2543
+ }
2544
+ }
2545
+ ```
2546
+ Pact Broker will respond with:
2547
+ ```json
2548
+ {
2549
+ "status": 200,
2550
+ "headers": {
2551
+ "Content-Type": "application/hal+json;charset=utf-8"
2552
+ },
2553
+ "body": {
2554
+ "consumer": {
2555
+ "name": "Condor"
2556
+ },
2557
+ "interactions": [
2558
+ ],
2559
+ "provider": {
2560
+ "name": "Pricing Service"
2561
+ }
2562
+ }
2563
+ }
2564
+ ```
2565
+ <a name="a_request_to_tag_the_production_version_of_Condor_given_&#39;Condor&#39;_exists_in_the_pact-broker_with_version_1.3.0,_tagged_with_&#39;prod&#39;"></a>
2566
+ Given **'Condor' exists in the pact-broker with version 1.3.0, tagged with 'prod'**, upon receiving **a request to tag the production version of Condor** from Pact Broker Client V2, with
2567
+ ```json
2568
+ {
2569
+ "method": "PUT",
2570
+ "path": "/pacticipants/Condor/versions/1.3.0/tags/prod",
2571
+ "headers": {
2572
+ "Content-Type": "application/json"
2573
+ },
2574
+ "body": {
2575
+ }
2576
+ }
2577
+ ```
2578
+ Pact Broker will respond with:
2579
+ ```json
2580
+ {
2581
+ "status": 200,
2582
+ "headers": {
2583
+ "Content-Type": "application/hal+json;charset=utf-8"
2584
+ },
2585
+ "body": {
2586
+ "_links": {
2587
+ "self": {
2588
+ "href": "/pacticipants/Condor/versions/1.3.0/tags/prod"
2589
+ }
2590
+ }
2591
+ }
2592
+ }
2593
+ ```
2594
+ <a name="a_request_to_tag_the_production_version_of_Condor_given_&#39;Condor&#39;_does_not_exist_in_the_pact-broker"></a>
2595
+ Given **'Condor' does not exist in the pact-broker**, upon receiving **a request to tag the production version of Condor** from Pact Broker Client V2, with
2596
+ ```json
2597
+ {
2598
+ "method": "PUT",
2599
+ "path": "/pacticipants/Condor/versions/1.3.0/tags/prod",
2600
+ "headers": {
2601
+ "Content-Type": "application/json"
2602
+ },
2603
+ "body": {
2604
+ }
2605
+ }
2606
+ ```
2607
+ Pact Broker will respond with:
2608
+ ```json
2609
+ {
2610
+ "status": 201,
2611
+ "headers": {
2612
+ "Content-Type": "application/hal+json;charset=utf-8"
2613
+ },
2614
+ "body": {
2615
+ "_links": {
2616
+ "self": {
2617
+ "href": "/pacticipants/Condor/versions/1.3.0/tags/prod"
2618
+ }
2619
+ }
2620
+ }
2621
+ }
2622
+ ```
2623
+ <a name="a_request_to_tag_the_production_version_of_Condor_given_&#39;Condor&#39;_exists_in_the_pact-broker"></a>
2624
+ Given **'Condor' exists in the pact-broker**, upon receiving **a request to tag the production version of Condor** from Pact Broker Client V2, with
2625
+ ```json
2626
+ {
2627
+ "method": "PUT",
2628
+ "path": "/pacticipants/Condor/versions/1.3.0/tags/prod",
2629
+ "headers": {
2630
+ "Content-Type": "application/json"
2631
+ },
2632
+ "body": {
2633
+ }
2634
+ }
2635
+ ```
2636
+ Pact Broker will respond with:
2637
+ ```json
2638
+ {
2639
+ "status": 201,
2640
+ "headers": {
2641
+ "Content-Type": "application/hal+json;charset=utf-8"
2642
+ },
2643
+ "body": {
2644
+ "_links": {
2645
+ "self": {
2646
+ "href": "/pacticipants/Condor/versions/1.3.0/tags/prod"
2647
+ }
2648
+ }
2649
+ }
2650
+ }
2651
+ ```
2652
+ <a name="a_request_to_update_a_pacticipant_given_a_pacticipant_with_name_Foo_exists"></a>
2653
+ Given **a pacticipant with name Foo exists**, upon receiving **a request to update a pacticipant** from Pact Broker Client V2, with
2654
+ ```json
2655
+ {
2656
+ "method": "PATCH",
2657
+ "path": "/pacticipants/Foo",
2658
+ "headers": {
2659
+ "Accept": "application/hal+json",
2660
+ "Content-Type": "application/json"
2661
+ },
2662
+ "body": {
2663
+ "name": "Foo",
2664
+ "repositoryUrl": "http://foo"
2665
+ }
2666
+ }
2667
+ ```
2668
+ Pact Broker will respond with:
2669
+ ```json
2670
+ {
2671
+ "status": 200,
2672
+ "headers": {
2673
+ "Content-Type": "application/hal+json;charset=utf-8"
2674
+ },
2675
+ "body": {
2676
+ "_links": {
2677
+ "self": {
2678
+ "href": "/pacticipants/Foo"
2679
+ }
2680
+ },
2681
+ "name": "Foo",
2682
+ "repositoryUrl": "http://foo"
2683
+ }
2684
+ }
2685
+ ```
2686
+ <a name="a_request_to_update_a_webhook_given_a_webhook_with_the_uuid_696c5f93-1b7f-44bc-8d03-59440fcaa9a0_exists"></a>
2687
+ Given **a webhook with the uuid 696c5f93-1b7f-44bc-8d03-59440fcaa9a0 exists**, upon receiving **a request to update a webhook** from Pact Broker Client V2, with
2688
+ ```json
2689
+ {
2690
+ "method": "PUT",
2691
+ "path": "/webhooks/696c5f93-1b7f-44bc-8d03-59440fcaa9a0",
2692
+ "headers": {
2693
+ "Accept": "application/hal+json",
2694
+ "Content-Type": "application/json"
2695
+ },
2696
+ "body": {
2697
+ "consumer": {
2698
+ "name": "Condor"
2699
+ },
2700
+ "description": "a webhook",
2701
+ "events": [
2702
+ {
2703
+ "name": "contract_content_changed"
2704
+ }
2705
+ ],
2706
+ "provider": {
2707
+ "name": "Pricing Service"
2708
+ },
2709
+ "request": {
2710
+ "body": {
2711
+ "some": "body"
2712
+ },
2713
+ "headers": {
2714
+ "Bar": "foo",
2715
+ "Foo": "bar"
2716
+ },
2717
+ "method": "POST",
2718
+ "password": "password",
2719
+ "url": "https://webhook",
2720
+ "username": "username"
2721
+ }
2722
+ }
2723
+ }
2724
+ ```
2725
+ Pact Broker will respond with:
2726
+ ```json
2727
+ {
2728
+ "status": 200,
2729
+ "headers": {
2730
+ "Content-Type": "application/hal+json;charset=utf-8"
2731
+ },
2732
+ "body": {
2733
+ "_links": {
2734
+ "self": {
2735
+ "href": "/some-url"
2736
+ }
2737
+ },
2738
+ "description": "a webhook",
2739
+ "events": [
2740
+ {
2741
+ "name": "contract_content_changed"
2742
+ }
2743
+ ],
2744
+ "request": {
2745
+ "body": {
2746
+ "some": "body"
2747
+ }
2748
+ }
2749
+ }
2750
+ }
2751
+ ```
2752
+ <a name="an_invalid_request_to_create_a_webhook_for_a_consumer_and_provider_given_the_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker"></a>
2753
+ Given **the 'Pricing Service' and 'Condor' already exist in the pact-broker**, upon receiving **an invalid request to create a webhook for a consumer and provider** from Pact Broker Client V2, with
2754
+ ```json
2755
+ {
2756
+ "method": "POST",
2757
+ "path": "/webhooks/provider/Pricing%20Service/consumer/Condor",
2758
+ "headers": {
2759
+ "Accept": "application/hal+json",
2760
+ "Content-Type": "application/json"
2761
+ },
2762
+ "body": {
2763
+ "description": "a webhook",
2764
+ "events": [
2765
+ {
2766
+ "name": "contract_content_changed"
2767
+ }
2768
+ ],
2769
+ "request": {
2770
+ "body": {
2771
+ "some": "body"
2772
+ },
2773
+ "headers": {
2774
+ "Bar": "foo",
2775
+ "Foo": "bar"
2776
+ },
2777
+ "method": "POST",
2778
+ "password": "password",
2779
+ "username": "username"
2780
+ }
2781
+ }
2782
+ }
2783
+ ```
2784
+ Pact Broker will respond with:
2785
+ ```json
2786
+ {
2787
+ "status": 400,
2788
+ "headers": {
2789
+ "Content-Type": "application/hal+json;charset=utf-8"
2790
+ },
2791
+ "body": {
2792
+ "errors": {
2793
+ "request.url": [
2794
+ "Some error"
2795
+ ]
2796
+ }
2797
+ }
2798
+ }
2799
+ ```