From 8eefba5fe3993633d92a3df583a140c54af96b4d Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Thu, 19 Nov 2020 16:58:52 +1100 Subject: [PATCH] feat: add link to the pact content version --- lib/pact_broker/api/decorators/pact_decorator.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/pact_broker/api/decorators/pact_decorator.rb b/lib/pact_broker/api/decorators/pact_decorator.rb index ce552e976..b0d1799b5 100644 --- a/lib/pact_broker/api/decorators/pact_decorator.rb +++ b/lib/pact_broker/api/decorators/pact_decorator.rb @@ -50,6 +50,14 @@ def to_hash(options = {}) } end + link :'pb:pact-version' do | options | + { + title: "Pact content version permalink", + name: represented.pact_version_sha, + href: pact_version_url(represented, options.fetch(:base_url)) + } + end + link :'pb:latest-pact-version' do | options | { title: "Latest version of this pact",