-
Notifications
You must be signed in to change notification settings - Fork 9
Macro::Contract::Schema
Vladislav Trotsenko edited this page Sep 26, 2019
·
1 revision
Provides to use Dry::Validation.Schema
as operation contract.
class SomeOperation < ApplicationOperation
step Macro::Contract::Schema(SomeContract)
step Contract::Validate()
end
class SomeOperation < ApplicationOperation
step Macro::Contract::Schema(SomeContract, name: :some_namespace)
step Contract::Validate(name: :some_namespace)
end
SomeContract = Dry::Validation.Schema { required(:some_attribute).filled(:str?) }
RubyGarage is a leading software development and consulting company in Eastern Europe. Our main expertise includes Ruby and Ruby on Rails, but we successfully employ other technologies to deliver the best results to our clients. Check out our portfolio for even more exciting works!