Class: PactBroker::Api::Contracts::CanIDeployQuerySchema
- Inherits:
-
Object
- Object
- PactBroker::Api::Contracts::CanIDeployQuerySchema
- Defined in:
- lib/pact_broker/matrix/can_i_deploy_query_schema.rb
Constant Summary collapse
- SCHEMA =
Dry::Validation.Schema do required(:pacticipant).filled(:str?) required(:version).filled(:str?) optional(:to).filled(:str?) end
Class Method Summary collapse
Class Method Details
.call(params) ⇒ Object
13 14 15 |
# File 'lib/pact_broker/matrix/can_i_deploy_query_schema.rb', line 13 def self.call(params) (SCHEMA.call(params).(full: true)) end |
.select_first_message(messages) ⇒ Object
17 18 19 20 21 |
# File 'lib/pact_broker/matrix/can_i_deploy_query_schema.rb', line 17 def self.() .each_with_object({}) do | (key, value), | [key] = [value.first] end end |