Skip to content

Fix datelike type parsing bug with nested schemas

Pat Nadolny requested to merge bug_fix/datelike_schema_parsing into main

Closes: #283 (closed)

The logic had a bug when "anyOf" was used with a non-string sub type like "array" or "object". I refactored the method to fix it, flip the logic to not make any assumptions, be a little cleaner, and added tests.

Other things to note:

  • This is a shallow validation which is fine, if theres an array or object type with date-times inside we do not iterate them right now. This might have performance implications so if we wanted to add it maybe its after we have a flag for turning off validation for performance.

Merge request reports