Sha256: 371ac742712093a737b23ff5114b0d42cdfeea73a9ff0d84d34053c8019c00c7
Contents?: true
Size: 1.77 KB
Versions: 5
Compression:
Stored size: 1.77 KB
Contents
require 'pact_broker/api/resources/base_resource' require 'json' module PactBroker module Api module Resources class Index < BaseResource def content_types_provided [["application/hal+json", :to_json]] end def allowed_methods ["GET"] end def to_json { _links: { 'self' => { href: base_url, title: 'Index', templated: false }, 'pb:latest-pact-versions' => { href: base_url + '/pacts/latest', title: 'Latest pact versions', templated: false }, 'pb:pacticipants' => { href: base_url + '/pacticipants', title: 'Pacticipants', templated: false }, 'pb:latest-provider-pacts' => { href: base_url + '/pacts/provider/{provider}/latest', title: 'Latest pacts by provider', templated: true }, 'pb:latest-provider-pacts-with-tag' => { href: base_url + '/pacts/provider/{provider}/latest/{tag}', title: 'Latest pacts by provider with a specified tag', templated: true }, 'pb:webhooks' => { href: base_url + '/webhooks', title: 'Webhooks', templated: false },'curies' => [{ name: 'pb', href: base_url + '/doc/{rel}', templated: true }] } }.to_json end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems