Sha256: 668fb94578628bade86a1e23a52470c65da4a94bbc34a8a843f4b7c29959eb04

Contents?: true

Size: 705 Bytes

Versions: 51

Compression:

Stored size: 705 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(user_options: { base_url: base_url })
        end
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
pact_broker-2.58.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.57.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.56.1 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.56.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.55.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.54.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.53.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.52.2 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.52.1 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.52.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.51.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.50.1 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.50.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.49.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.48.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.47.1 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.47.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.46.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.45.0 lib/pact_broker/api/resources/pacticipants_for_label.rb
pact_broker-2.44.0 lib/pact_broker/api/resources/pacticipants_for_label.rb