Sha256: d8cf0ca136008e462d862a7288c5bc1e1dc5429fe31001d7843223dc5922e26b

Contents?: true

Size: 756 Bytes

Versions: 3

Compression:

Stored size: 756 Bytes

Contents

require "pact_broker/api/resources/base_resource"
require "pact_broker/api/decorators/pacticipant_collection_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(:pacticipant_collection_decorator).new(pacticipants).to_json(**decorator_options)
        end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pact_broker-2.107.1 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.107.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.107.0.beta.1 lib/pact_broker/api/resources/pacticipants_for_label.rb