Sha256: b11b38bfdc1bd662bf96c6901239d46eb79df5d79726468cb0a70034c82011db

Contents?: true

Size: 598 Bytes

Versions: 20

Compression:

Stored size: 598 Bytes

Contents

require 'reform'
require 'reform/contract'
require 'pact_broker/api/contracts/request_validations'

module PactBroker
  module Api
    module Contracts

      class WebhookContract < Reform::Contract

        property :request
        validates :request, presence: true

        property :request do

          include RequestValidations

          property :url
          property :http_method

          validates :url, presence: true
          validates :http_method, presence: true

          validate :method_is_valid
          validate :url_is_valid

        end

      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
pact_broker-1.14.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.13.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.12.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.11.2 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.11.1 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.11.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.10.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.9.3 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.9.2 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.9.1 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.9.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.9.0.rc1 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.8.1 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.8.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.7.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.6.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.5.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.4.0 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.3.2.rc1 lib/pact_broker/api/contracts/webhook_contract.rb
pact_broker-1.3.1 lib/pact_broker/api/contracts/webhook_contract.rb