-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
AnyOf not supported #49
Comments
I looked a bit at the code and I'm thinking of adding a What do you think? |
Can you add a reference to the part of the JSON Schema for this? 👍 for a PR anyway. |
I'm sorry, do you mean the JSON Schema spec ? |
Yes thanks!! a PR would be very welcome! |
I created #50 (and started it with failing tests) but I'm not sure how to start the implementation. My first guess was to add a case "anyOf" that will call the function again for each key. What do you think of that? |
go for it! |
Worked a bit on that yesterday and I'm a bit stuck. A achieve to catch Any leads? Thanks |
I don’t know really. Trying multiple paths and throwing errors completely defeat the purpose of this library. A possibility might be to use Ajv to validate all the various option, but it would be slower. |
If it's noted clearly that using |
Yes definitely. |
I finally had some time to work on this but I'm hitting an issue: how can I use |
It should be done following this pattern: https://github.com/fastify/fast-json-stringify/blob/master/index.js#L90-L92 |
Thank you! First draft of my implementation ready here |
Closed by #50 |
When trying to validate against a JSON schema containing
anyOf
type, the parser throw an error.throws
undefined unsupported
.I'll make a PR with a failing test case so it can be clearer.
The text was updated successfully, but these errors were encountered: