-
Notifications
You must be signed in to change notification settings - Fork 108
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
Using "Any" generates incorrect rules #111
Comments
Yes! Same cause as issue #97. |
Hey @mckoss - any update on this one? I just revisited some rules, used |
Hey @mckoss I am trying to rewrite the Firebase Queue rules from JSON to Bolt and below is the case when type
Will generate:
As you can see If on the other hand I try to generate them from the following:
I get:
Again the |
Hi Also bumped into this issue. I use this workaround:
|
Fixes issue #111 - don't prematurely optimize .validate: true rules in presence of $other sibling.
Fixed by PR #166 |
Consider the following setup:
The third property of
MyType
is defined as type Any, so I would expect that, atpath
in the rules, it would ensure thatany
was included in anewData.hasChildren([])
statement, and then the specific.validate
rule would check to ensure that it wasn't null. However, the following rules are generated:Notice the complete lack of a
.validate
rule forany
, even though the parent.validate
includes it in.hasChildren()
. Because this is left out, the$other
wildcard.validate: false
rule breaks the rule generation!The text was updated successfully, but these errors were encountered: