Sha256: 15caf45f24bc7d9a30e4ee3c18121f54fb159c552a2923dfe83180866c5dbd4b

Contents?: true

Size: 736 Bytes

Versions: 9

Compression:

Stored size: 736 Bytes

Contents

require "pact_broker/api/resources/base_resource"
require "pact_broker/api/decorators/pacticipants_decorator"

module PactBroker
  module Api
    module Resources
      class PacticipantsForLabel < BaseResource

        def content_types_provided
          [["application/hal+json", :to_json]]
        end

        def allowed_methods
          ["GET", "OPTIONS"]
        end

        def to_json
          generate_json(pacticipant_service.find identifier_from_path )
        end

        def generate_json pacticipants
          decorator_class(:pacticipants_decorator).new(pacticipants).to_json(**decorator_options)
        end

        def policy_name
          :'pacticipants::pacticipants'
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pact_broker-2.114.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.113.2 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.113.1 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.113.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.112.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.111.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.109.1 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.109.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.108.0 lib/pact_broker/api/resources/pacticipants_for_label.rb