Sha256: bd98a0f59b85129aa7acd6f2ccdb145e1f6633304c85c38907d94b4db289e07f

Contents?: true

Size: 763 Bytes

Versions: 17

Compression:

Stored size: 763 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
          PactBroker::Api::Decorators::PacticipantCollectionDecorator.new(pacticipants).to_json(decorator_options)
        end

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pact_broker-2.74.1 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.74.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.73.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.72.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.71.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.70.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.69.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.68.1 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.68.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.67.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.66.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.65.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.64.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.63.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.62.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.61.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.60.1 lib/pact_broker/api/resources/pacticipants_for_label.rb