From dca0ad4f7a83d7ee62ff75aee1dade0354d8fa9c Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Sat, 11 Jan 2020 08:00:47 +1100 Subject: [PATCH] feat: add hal relation for creating a tag on the pacticipant version resource --- lib/pact_broker/api/decorators/version_decorator.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/pact_broker/api/decorators/version_decorator.rb b/lib/pact_broker/api/decorators/version_decorator.rb index b284990ca..27cb31868 100644 --- a/lib/pact_broker/api/decorators/version_decorator.rb +++ b/lib/pact_broker/api/decorators/version_decorator.rb @@ -26,6 +26,14 @@ class VersionDecorator < BaseDecorator } end + link :'pb:tag' do | options | + { + href: pacticipant_url(options.fetch(:base_url), represented.pacticipant) + '/tags/{tag}', + title: "Get, create or delete a tag for this pacticipant version", + templated: true + } + end + link :'pb:latest-verification-results-where-pacticipant-is-consumer' do | options | { title: "Latest verification results for consumer version",