Skip to content

Commit ccdd46f

Browse files
committed
feat: deprecate pacts relation in favour of pb:pacts in latest pacts resource
1 parent 7d587d9 commit ccdd46f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/pact_broker/api/decorators/pact_collection_decorator.rb

+11
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,23 @@ def create_representable_pact pact
2424
latest_pacts_url(options[:base_url])
2525
end
2626

27+
# This is the LATEST pact URL
28+
links :'pb:pacts' do | options |
29+
represented.collect do | pact |
30+
{
31+
:href => latest_pact_url(options[:base_url], pact),
32+
:title => "Latest pact between #{pact.consumer.name} and #{pact.provider.name}",
33+
}
34+
end
35+
end
36+
2737
# This is the LATEST pact URL
2838
links :pacts do | options |
2939
represented.collect do | pact |
3040
{
3141
:href => latest_pact_url(options[:base_url], pact),
3242
:title => "Latest pact between #{pact.consumer.name} and #{pact.provider.name}",
43+
:name => "DEPRECATED - please use the pb:pacts relation"
3344
}
3445
end
3546
end

0 commit comments

Comments
 (0)