-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compile strings etc as regexes #101
Conversation
I think this is good to go. It happens. to fix an enum quoting issue that's present on |
Awesome, will try to review today! |
parser/src/json/compiler.rs
Outdated
// TODO: is this special case needed? | ||
Schema::Number { | ||
minimum: Some(x), | ||
maximum: Some(y), | ||
.. | ||
} if x == y => Some(RegexAst::Literal(x.to_string())), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this special case actually get us into trouble, e.g. if min == max, but exclusiveMinimum > minimum, or if min == max is a non-integer, but we have integer=True?
Btw I'm open to changing our representation to exclusive{Minumum,Maximum} being bools if it simplifies things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's nuke it then
Bar my one comment, lgtm! |
cc @hudson-ai for awareness; still WIP!