-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix checkSchema for anyOf and items array #4741
Conversation
This breaks the CI, please check. |
As I wrote in my description, I don't think the tests with
rxdb/test/unit/rx-schema.test.ts Lines 158 to 175 in 8261b1a
rxdb/test/unit/rx-schema.test.ts Lines 203 to 205 in 8261b1a
Lines 625 to 650 in 8261b1a
This tests worked before because
I think this error is only thrown because the fieldname check had bugs with arrays. That's why it fails in this PR because I improved the array handling. Please tell me how the checks are supposed to handle |
Thank you @pubkey. I have rebased my PR, the CI checks now pass successfully. |
Awesome, merged. |
This PR contains:
Describe the problem you have without this PR
The dev mode plugin throws
"fieldnames do not match the regex"
forfieldName:"0"
if the schema containsanyOf
or anitems
array.My patch seems to break the (negative) test for this schema. I'm not sure how this test was supposed to work. It seems like it only worked before because
checkSchema
had bugs with arrays.rxdb/test/helper/schemas.ts
Lines 625 to 650 in 397ecf2