lib/lingutest_client/api/operations/create.rb in lingutest_client-0.1.5 vs lib/lingutest_client/api/operations/create.rb in lingutest_client-0.2.0

- old
+ new

@@ -3,10 +3,10 @@ module LingutestClient module API module Operations module Create module ClassMethods - def create(**params) # rubocop:disable Metrics/AbcSize + def create(**params) schema = const_get(:CreateSchema).call(params) unless schema.success? raise ValidationError, schema.errors.to_h.to_a.first.flatten.join(' ') end