Closed fameoflight closed 2 years ago
Would appreciate any help of what I might be doing wrong
after little more investigation, it seems like this code remove unknown attributes
def handle_unknown_attribute(value, exception)
attribute = exception.attribute.to_sym
value_symbolized = value.symbolize_keys
value_symbolized = value_symbolized[:attributes] if value_symbolized.key?(:attributes)
cast_value(value_symbolized.except(attribute)).tap do |configuration|
configuration.unknown_attributes[attribute.to_s] = value_symbolized[attribute]
end
end
which seems pretty dangerous
Hi! Unknown attributes are stored in the separate place and can be acessed via #unknown_attributes
(per doc). I guess you need to make sure that all possible values of OneOf
have that title attribute.
Here is the output
And