Sha256: b019a2d7ad7b1ff6c0a3d7337a7d3ef79e2f07a54556fdddae45ca81f52d222f
Contents?: true
Size: 1.01 KB
Versions: 12
Compression:
Stored size: 1.01 KB
Contents
require_relative 'base_decorator' require 'pact_broker/api/decorators/webhook_decorator' module PactBroker module Api module Decorators class WebhooksDecorator < BaseDecorator link :self do | context | { title: context[:resource_title], href: context[:resource_url] } end link :'pb:create' do | context | { title: "POST to create a webhook", href: context[:resource_url] } end links :'pb:webhooks' do | context | represented.entries.collect do | webhook | { title: webhook.description, name: webhook.request_description, href: webhook_url(webhook.uuid, context[:base_url]) } end end curies do | context | [{ name: :pb, href: context[:base_url] + '/doc/webhooks-{rel}', templated: true }] end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems