lib/cocina/generator/schema.rb in cocina-models-0.75.0 vs lib/cocina/generator/schema.rb in cocina-models-0.76.0
- old
+ new
@@ -99,12 +99,10 @@
def one_of_properties_for(doc)
return [] if doc.one_of.nil?
# All properties must be objects.
- unless doc.one_of.all? { |schema| schema.type == 'object' }
- raise 'All properties for oneOf must be objects'
- end
+ raise 'All properties for oneOf must be objects' unless doc.one_of.all? { |schema| schema.type == 'object' }
doc.one_of.flat_map do |one_of_doc|
one_of_doc.properties.map do |key, properties_doc|
property_class_for(properties_doc).new(properties_doc,
key: key,