pact_broker-client 1.25.1 → 1.27.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release_gem.yml +35 -0
  3. data/.github/workflows/trigger_pact_cli_release.yml +15 -0
  4. data/.github/workflows/trigger_pact_docs_update.yml +19 -0
  5. data/CHANGELOG.md +39 -0
  6. data/Gemfile +10 -1
  7. data/README.md +4 -3
  8. data/appveyor.yml +1 -1
  9. data/doc/pacts/markdown/Pact Broker Client - Pact Broker.md +168 -10
  10. data/lib/pact_broker/client/can_i_deploy.rb +6 -0
  11. data/lib/pact_broker/client/cli/broker.rb +32 -0
  12. data/lib/pact_broker/client/cli/custom_thor.rb +12 -1
  13. data/lib/pact_broker/client/git.rb +2 -1
  14. data/lib/pact_broker/client/hal/entity.rb +12 -1
  15. data/lib/pact_broker/client/hal/http_client.rb +6 -0
  16. data/lib/pact_broker/client/hal/link.rb +4 -0
  17. data/lib/pact_broker/client/hal_client_methods.rb +15 -0
  18. data/lib/pact_broker/client/matrix/resource.rb +5 -1
  19. data/lib/pact_broker/client/pacticipants/create.rb +57 -0
  20. data/lib/pact_broker/client/pacts/list_latest_versions.rb +65 -0
  21. data/lib/pact_broker/client/publish_pacts.rb +1 -1
  22. data/lib/pact_broker/client/version.rb +1 -1
  23. data/lib/pact_broker/client/webhooks/test.rb +16 -0
  24. data/pact-broker-client.gemspec +3 -5
  25. data/script/prepare-release.sh +11 -0
  26. data/script/release-gem.sh +23 -0
  27. data/script/release.sh +1 -1
  28. data/script/trigger-release.sh +15 -0
  29. data/spec/integration/can_i_deploy_spec.rb +3 -3
  30. data/spec/integration/create_version_tag_spec.rb +2 -3
  31. data/spec/lib/pact_broker/client/can_i_deploy_spec.rb +22 -4
  32. data/spec/lib/pact_broker/client/pacticipants/create_spec.rb +28 -0
  33. data/spec/pacts/pact_broker_client-pact_broker.json +179 -10
  34. data/spec/service_providers/pact_broker_client_matrix_spec.rb +10 -10
  35. data/spec/service_providers/pact_helper.rb +29 -0
  36. data/spec/service_providers/pacticipants_create_spec.rb +118 -0
  37. metadata +29 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c78c1aac0ad2d50892f581f5bf0bb77b4b73e32b1ae359ae94a62eb4d62855b
4
- data.tar.gz: 509cc602635703e5ff07520ef5b0163ff47ed4cbaadebca33de0ebced3d34bdd
3
+ metadata.gz: 711ccd7e9c78c20b610a6d6018bae6412dfaca133c5ddb9e2c2532d45b315d63
4
+ data.tar.gz: 21d2caf30f8967bb28bff27eb4db553a6a77681f01131507c0a42df9076e5a80
5
5
  SHA512:
6
- metadata.gz: 38988ea9692c16df96c3ba1c18cbd2509286efede5b7e72d2561540ffeb78e0d5e442a83aacd26f2ca61f4939a2e4458130bcdc0f605e1711c304590f281e9e0
7
- data.tar.gz: 2efd70539e123a3b2b7ffbe7f2c691f497ba4dc1034fb25d4fd5800faa4cae50bbd2960ba3a87a149decb5127bdc7621873f51d60ab48dc988f5059bad3a6125
6
+ metadata.gz: 1b46459fd5fb59d335a647e6000272f346f4a8b44845644249d7e870b0a54a60fe9daa0071c1dadcc260967395367ee688123021bfa9a7eb988d12d011d7842f
7
+ data.tar.gz: 368645a3cf3f8890ec85e158dd2406ebeb7e98fcd6be608fe802357ba34ab53192e6312774a05788d93caea23b3d92ec54df7cc60740ffa9b607b83f4c5a1204
@@ -0,0 +1,35 @@
1
+ name: Release gem
2
+
3
+ on:
4
+ repository_dispatch:
5
+ types:
6
+ - release-patch
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ with:
14
+ fetch-depth: 0
15
+ - uses: actions/setup-ruby@v1
16
+ with:
17
+ ruby-version: '2.6'
18
+ - name: Install gems
19
+ run: |
20
+ gem install bundler -v 2.0.2
21
+ bundle install
22
+ - name: Configure git
23
+ run: |
24
+ git config user.email "beth@bethesque.com"
25
+ git config user.name "Beth Skurrie via Github Actions"
26
+ - name: Prepare release
27
+ run: script/prepare-release.sh
28
+ env:
29
+ INCREMENT: patch
30
+ - name: Release gem
31
+ run: script/release-gem.sh
32
+ env:
33
+ BUNDLE_GEM__PUSH_KEY: '${{ secrets.RUBYGEMS_API_KEY }}'
34
+ BUNDLE_GITHUB__COM: x-access-token:${{ secrets.GITHUB_TOKEN }}
35
+ GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
@@ -0,0 +1,15 @@
1
+ name: Trigger release of the pact-cli Docker image
2
+ on:
3
+ release:
4
+ types: [created]
5
+
6
+ jobs:
7
+ build:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: Repository Dispatch
11
+ uses: peter-evans/repository-dispatch@v1
12
+ with:
13
+ token: ${{ secrets.GHTOKENFORPACTCLIRELEASE }}
14
+ repository: pact-foundation/pact-ruby-cli
15
+ event-type: gem-released
@@ -0,0 +1,19 @@
1
+ name: Trigger update to docs.pact.io
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths:
8
+ - '**.md'
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Trigger docs.pact.io update workflow
15
+ uses: peter-evans/repository-dispatch@v1
16
+ with:
17
+ token: ${{ secrets.GHTOKENFORTRIGGERINGPACTDOCSUPDATE }}
18
+ repository: pact-foundation/docs.pact.io
19
+ event-type: pact-broker-client-docs-updated
@@ -1,3 +1,42 @@
1
+ <a name="v1.27.1"></a>
2
+ ### v1.27.1 (2020-07-10)
3
+
4
+
5
+ #### Features
6
+
7
+ * **deps**
8
+ * this isn't really a feature, but I want to test the release workflow ([29a7b72](/../../commit/29a7b72))
9
+
10
+
11
+ <a name="v1.27.0"></a>
12
+ ### v1.27.0 (2020-05-09)
13
+
14
+
15
+ #### Features
16
+
17
+ * add BITBUCKET_BRANCH to list of known branch variables (#69) ([d1dc088](/../../commit/d1dc088))
18
+ * add list-latest-pact-versions command ([ed45d58](/../../commit/ed45d58))
19
+
20
+
21
+ <a name="v1.26.0"></a>
22
+ ### v1.26.0 (2020-04-17)
23
+
24
+
25
+ #### Features
26
+
27
+ * update message when waiting for verification results ([68df012](/../../commit/68df012))
28
+ * add create-or-update-pacticipant ([f1c33ae](/../../commit/f1c33ae))
29
+
30
+ * **can i deploy**
31
+ * put out a message while waiting for verification results to be published ([cc1ba5f](/../../commit/cc1ba5f))
32
+
33
+ * **publish pacts**
34
+ * improve message when overwriting pacts ([17b93f3](/../../commit/17b93f3))
35
+
36
+ * **webhooks**
37
+ * add command to test webhook execution ([0ee1f7a](/../../commit/0ee1f7a))
38
+
39
+
1
40
  <a name="v1.25.1"></a>
2
41
  ### v1.25.1 (2020-04-02)
3
42
 
data/Gemfile CHANGED
@@ -4,4 +4,13 @@ gemspec
4
4
 
5
5
  # Not sure why jruby on Travis fails saying rake is not part of the bundle,
6
6
  # even thought it's in the development dependencies. Trying it here.
7
- gem 'rake', '~> 10.0.3'
7
+ gem 'rake', '~> 13.0'
8
+
9
+ group :release do
10
+ gem 'bump', git: 'https://github.com/bethesque/bump.git'
11
+ end
12
+
13
+ if ENV['X_PACT_DEVELOPMENT'] == 'true'
14
+ gem 'pact-mock_service', path: '../pact-mock_service'
15
+ gem 'pact-support', path: '../pact-support'
16
+ end
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # Pact Broker Client
2
2
 
3
- A client for the Pact Broker. Publishes pacts to, and retrieves pacts from, a Pact Broker. The functionality is available via a CLI, or via Ruby Rake tasks. You can also use the [Pact CLI Docker image](https://hub.docker.com/r/pactfoundation/pact-cli).
3
+ A client for the Pact Broker. Publishes and retrieves pacts, verification results, pacticipants, pacticipant versions and tags. The functionality is available via a CLI, or via Ruby Rake tasks. You can also use the [Pact CLI Docker image](https://hub.docker.com/r/pactfoundation/pact-cli).
4
4
 
5
5
  [![Build Status](https://travis-ci.org/pact-foundation/pact_broker-client.svg?branch=master)](https://travis-ci.org/pact-foundation/pact_broker-client)
6
6
 
7
+ ![Trigger update to docs.pact.io](https://github.com/pact-foundation/pact_broker-client/workflows/Trigger%20update%20to%20docs.pact.io/badge.svg)
8
+
7
9
  ## Installation
8
10
 
9
11
  ### CLI
@@ -345,6 +347,5 @@ end
345
347
  bundle exec rake pact:publish
346
348
  ```
347
349
 
348
- [wiki-tags]: https://github.com/pact-foundation/pact_broker/wiki/Using-tags
349
350
  [pact-ruby-standalone]: https://github.com/pact-foundation/pact-ruby-standalone/releases
350
- [docker]: https://cloud.docker.com/u/pactfoundation/repository/docker/pactfoundation/pact-cli
351
+ [docker]: https://hub.docker.com/r/pactfoundation/pact-cli
@@ -6,7 +6,7 @@ build: off
6
6
 
7
7
  install:
8
8
  - set PATH=C:\Ruby22\bin;%PATH%
9
- - bundle install
9
+ - bundle install --without release
10
10
 
11
11
  before_test:
12
12
  - ruby -v
@@ -22,6 +22,8 @@
22
22
 
23
23
  * [A request for the index resource](#a_request_for_the_index_resource)
24
24
 
25
+ * [A request for the index resource](#a_request_for_the_index_resource_given_the_pacticipant_relations_are_present) given the pacticipant relations are present
26
+
25
27
  * [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
26
28
 
27
29
  * [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
@@ -38,6 +40,8 @@
38
40
 
39
41
  * [A request to create a global webhook with a JSON body](#a_request_to_create_a_global_webhook_with_a_JSON_body)
40
42
 
43
+ * [A request to create a pacticipant](#a_request_to_create_a_pacticipant)
44
+
41
45
  * [A request to create a webhook for a consumer and provider](#a_request_to_create_a_webhook_for_a_consumer_and_provider_given_&#39;Condor&#39;_does_not_exist_in_the_pact-broker) given 'Condor' does not exist in the pact-broker
42
46
 
43
47
  * [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_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
@@ -76,6 +80,10 @@
76
80
 
77
81
  * [A request to register the repository URL of a pacticipant](#a_request_to_register_the_repository_URL_of_a_pacticipant_given_the_&#39;Pricing_Service&#39;_does_not_exist_in_the_pact-broker) given the 'Pricing Service' does not exist in the pact-broker
78
82
 
83
+ * [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
84
+
85
+ * [A request to retrieve a pacticipant](#a_request_to_retrieve_a_pacticipant)
86
+
79
87
  * [A request to retrieve the latest 'production' version of Condor](#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) given 'Condor' exists in the pact-broker with the latest tagged 'production' version 1.2.3
80
88
 
81
89
  * [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
@@ -92,6 +100,8 @@
92
100
 
93
101
  * [A request to tag the production version of Condor](#a_request_to_tag_the_production_version_of_Condor_given_&#39;Condor&#39;_exists_in_the_pact-broker) given 'Condor' exists in the pact-broker
94
102
 
103
+ * [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
104
+
95
105
  * [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
96
106
 
97
107
  * [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_&#39;Pricing_Service&#39;_and_&#39;Condor&#39;_already_exist_in_the_pact-broker) given the 'Pricing Service' and 'Condor' already exist in the pact-broker
@@ -104,7 +114,7 @@ Upon receiving **a request for the compatibility matrix for a pacticipant that d
104
114
  {
105
115
  "method": "get",
106
116
  "path": "/matrix",
107
- "query": "q[][pacticipant]=Wiffle&q[][version]=1.2.3&q[][pacticipant]=Meep&q[][version]=9.9.9&latestby=cvpv"
117
+ "query": "q%5B%5D%5Bpacticipant%5D=Wiffle&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Meep&q%5B%5D%5Bversion%5D=9.9.9&latestby=cvpv"
108
118
  }
109
119
  ```
110
120
  Pact Broker will respond with:
@@ -127,7 +137,7 @@ Given **the pact for Foo version 1.2.3 and 1.2.4 has been verified by Bar versio
127
137
  {
128
138
  "method": "get",
129
139
  "path": "/matrix",
130
- "query": "q[][pacticipant]=Foo&q[][pacticipant]=Bar&latestby=cvpv"
140
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bpacticipant%5D=Bar&latestby=cvpv"
131
141
  }
132
142
  ```
133
143
  Pact Broker will respond with:
@@ -191,7 +201,7 @@ Given **the pact for Foo Thing version 1.2.3 has been verified by Bar version 4.
191
201
  {
192
202
  "method": "get",
193
203
  "path": "/matrix",
194
- "query": "q[][pacticipant]=Foo%20Thing&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][version]=4.5.6&latestby=cvpv"
204
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo%20Thing&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=4.5.6&latestby=cvpv"
195
205
  }
196
206
  ```
197
207
  Pact Broker will respond with:
@@ -239,7 +249,7 @@ Given **the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6**,
239
249
  {
240
250
  "method": "get",
241
251
  "path": "/matrix",
242
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][version]=4.5.6&latestby=cvpv"
252
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=4.5.6&latestby=cvpv"
243
253
  }
244
254
  ```
245
255
  Pact Broker will respond with:
@@ -287,7 +297,7 @@ Given **the pact for Foo version 1.2.3 has been successfully verified by Bar ver
287
297
  {
288
298
  "method": "get",
289
299
  "path": "/matrix",
290
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][latest]=true&q[][tag]=prod&latestby=cvpv"
300
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Blatest%5D=true&q%5B%5D%5Btag%5D=prod&latestby=cvpv"
291
301
  }
292
302
  ```
293
303
  Pact Broker will respond with:
@@ -335,7 +345,7 @@ Given **the pact for Foo version 1.2.3 has been successfully verified by Bar ver
335
345
  {
336
346
  "method": "get",
337
347
  "path": "/matrix",
338
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&latestby=cvp&latest=true&tag=prod"
348
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&latestby=cvp&latest=true&tag=prod"
339
349
  }
340
350
  ```
341
351
  Pact Broker will respond with:
@@ -371,7 +381,7 @@ Given **the pact for Foo version 1.2.3 has been successfully verified by Bar ver
371
381
  {
372
382
  "method": "get",
373
383
  "path": "/matrix",
374
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.4&q[][pacticipant]=Bar&q[][latest]=true&latestby=cvpv"
384
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.4&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Blatest%5D=true&latestby=cvpv"
375
385
  }
376
386
  ```
377
387
  Pact Broker will respond with:
@@ -419,7 +429,7 @@ Given **the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6**,
419
429
  {
420
430
  "method": "get",
421
431
  "path": "/matrix",
422
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&q[][pacticipant]=Bar&q[][version]=9.9.9&latestby=cvpv"
432
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&q%5B%5D%5Bpacticipant%5D=Bar&q%5B%5D%5Bversion%5D=9.9.9&latestby=cvpv"
423
433
  }
424
434
  ```
425
435
  Pact Broker will respond with:
@@ -442,7 +452,7 @@ Given **the pact for Foo version 1.2.3 has been verified by Bar version 4.5.6 an
442
452
  {
443
453
  "method": "get",
444
454
  "path": "/matrix",
445
- "query": "q[][pacticipant]=Foo&q[][version]=1.2.3&latestby=cvp&latest=true"
455
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bversion%5D=1.2.3&latestby=cvp&latest=true"
446
456
  }
447
457
  ```
448
458
  Pact Broker will respond with:
@@ -506,6 +516,42 @@ Pact Broker will respond with:
506
516
  "_links": {
507
517
  "pb:webhooks": {
508
518
  "href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-WEBHOOKS"
519
+ },
520
+ "pb:pacticipants": {
521
+ "href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-PACTICIPANTS"
522
+ },
523
+ "pb:pacticipant": {
524
+ "href": "http://localhost:1234/HAL-REL-PLACEHOLDER-PB-PACTICIPANT-{pacticipant}"
525
+ }
526
+ }
527
+ }
528
+ }
529
+ ```
530
+ <a name="a_request_for_the_index_resource_given_the_pacticipant_relations_are_present"></a>
531
+ Given **the pacticipant relations are present**, upon receiving **a request for the index resource** from Pact Broker Client, with
532
+ ```json
533
+ {
534
+ "method": "get",
535
+ "path": "/",
536
+ "headers": {
537
+ "Accept": "application/hal+json"
538
+ }
539
+ }
540
+ ```
541
+ Pact Broker will respond with:
542
+ ```json
543
+ {
544
+ "status": 200,
545
+ "headers": {
546
+ "Content-Type": "application/hal+json;charset=utf-8"
547
+ },
548
+ "body": {
549
+ "_links": {
550
+ "pb:pacticipants": {
551
+ "href": "http://localhost:1234/pacticipants"
552
+ },
553
+ "pb:pacticipant": {
554
+ "href": "http://localhost:1234/pacticipants/{pacticipant}"
509
555
  }
510
556
  }
511
557
  }
@@ -657,7 +703,7 @@ Given **the pact for Foo version 1.2.3 has been successfully verified by Bar ver
657
703
  {
658
704
  "method": "get",
659
705
  "path": "/matrix",
660
- "query": "q[][pacticipant]=Foo&q[][pacticipant]=Bar&latestby=cvpv&success[]=true"
706
+ "query": "q%5B%5D%5Bpacticipant%5D=Foo&q%5B%5D%5Bpacticipant%5D=Bar&latestby=cvpv&success%5B%5D=true"
661
707
  }
662
708
  ```
663
709
  Pact Broker will respond with:
@@ -778,6 +824,40 @@ Pact Broker will respond with:
778
824
  }
779
825
  }
780
826
  ```
827
+ <a name="a_request_to_create_a_pacticipant"></a>
828
+ Upon receiving **a request to create a pacticipant** from Pact Broker Client, with
829
+ ```json
830
+ {
831
+ "method": "post",
832
+ "path": "/pacticipants",
833
+ "headers": {
834
+ "Content-Type": "application/json",
835
+ "Accept": "application/hal+json"
836
+ },
837
+ "body": {
838
+ "name": "Foo",
839
+ "repositoryUrl": "http://foo"
840
+ }
841
+ }
842
+ ```
843
+ Pact Broker will respond with:
844
+ ```json
845
+ {
846
+ "status": 201,
847
+ "headers": {
848
+ "Content-Type": "application/hal+json;charset=utf-8"
849
+ },
850
+ "body": {
851
+ "name": "Foo",
852
+ "repositoryUrl": "http://foo",
853
+ "_links": {
854
+ "self": {
855
+ "href": "http://localhost:1234/pacticipants/Foo"
856
+ }
857
+ }
858
+ }
859
+ }
860
+ ```
781
861
  <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>
782
862
  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, with
783
863
  ```json
@@ -1598,6 +1678,50 @@ Pact Broker will respond with:
1598
1678
  }
1599
1679
  }
1600
1680
  ```
1681
+ <a name="a_request_to_retrieve_a_pacticipant_given_a_pacticipant_with_name_Foo_exists"></a>
1682
+ Given **a pacticipant with name Foo exists**, upon receiving **a request to retrieve a pacticipant** from Pact Broker Client, with
1683
+ ```json
1684
+ {
1685
+ "method": "get",
1686
+ "path": "/pacticipants/Foo",
1687
+ "headers": {
1688
+ "Accept": "application/hal+json"
1689
+ }
1690
+ }
1691
+ ```
1692
+ Pact Broker will respond with:
1693
+ ```json
1694
+ {
1695
+ "status": 200,
1696
+ "headers": {
1697
+ "Content-Type": "application/hal+json;charset=utf-8"
1698
+ },
1699
+ "body": {
1700
+ "_links": {
1701
+ "self": {
1702
+ "href": "http://localhost:1234/pacticipants/Foo"
1703
+ }
1704
+ }
1705
+ }
1706
+ }
1707
+ ```
1708
+ <a name="a_request_to_retrieve_a_pacticipant"></a>
1709
+ Upon receiving **a request to retrieve a pacticipant** from Pact Broker Client, with
1710
+ ```json
1711
+ {
1712
+ "method": "get",
1713
+ "path": "/pacticipants/Foo",
1714
+ "headers": {
1715
+ "Accept": "application/hal+json"
1716
+ }
1717
+ }
1718
+ ```
1719
+ Pact Broker will respond with:
1720
+ ```json
1721
+ {
1722
+ "status": 404
1723
+ }
1724
+ ```
1601
1725
  <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>
1602
1726
  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, with
1603
1727
  ```json
@@ -1809,6 +1933,40 @@ Pact Broker will respond with:
1809
1933
  }
1810
1934
  }
1811
1935
  ```
1936
+ <a name="a_request_to_update_a_pacticipant_given_a_pacticipant_with_name_Foo_exists"></a>
1937
+ Given **a pacticipant with name Foo exists**, upon receiving **a request to update a pacticipant** from Pact Broker Client, with
1938
+ ```json
1939
+ {
1940
+ "method": "patch",
1941
+ "path": "/pacticipants/Foo",
1942
+ "headers": {
1943
+ "Content-Type": "application/json",
1944
+ "Accept": "application/hal+json"
1945
+ },
1946
+ "body": {
1947
+ "name": "Foo",
1948
+ "repositoryUrl": "http://foo"
1949
+ }
1950
+ }
1951
+ ```
1952
+ Pact Broker will respond with:
1953
+ ```json
1954
+ {
1955
+ "status": 200,
1956
+ "headers": {
1957
+ "Content-Type": "application/hal+json;charset=utf-8"
1958
+ },
1959
+ "body": {
1960
+ "name": "Foo",
1961
+ "repositoryUrl": "http://foo",
1962
+ "_links": {
1963
+ "self": {
1964
+ "href": "http://localhost:1234/pacticipants/Foo"
1965
+ }
1966
+ }
1967
+ }
1968
+ }
1969
+ ```
1812
1970
  <a name="a_request_to_update_a_webhook_given_a_webhook_with_the_uuid_696c5f93-1b7f-44bc-8d03-59440fcaa9a0_exists"></a>
1813
1971
  Given **a webhook with the uuid 696c5f93-1b7f-44bc-8d03-59440fcaa9a0 exists**, upon receiving **a request to update a webhook** from Pact Broker Client, with
1814
1972
  ```json