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
tuple validation #28
Comments
Yes, that's a bug. I don't know how easy it is to get this information from the AST but I'd love to get a PR for this. |
I could have a look, but it looks like the additionalItems property was explicitely added, while I think tuples should not allow additionalItems. But maybe there's something I'm missing.
could become
And then one would need to look into the |
I looked into it. So, while this Still, I believe it goes against the expected behavior of a schema generator. Maybe you could want an option for this? With regard to the lowering the value of minItems if the trailing elements of the tuple include Not sure how you want to go about this. |
Thanks for looking into this! In this library, I chose not to add many options and have the most correct defaults. If you want more options, they could be added to https://github.com/YousefED/typescript-json-schema. I hope that makes sense. |
Ok, thanks! |
Good question! YousefED/typescript-json-schema uses |
Got it. Thanks! |
I see. Well, let me ask then, would you be willing to help me maintain this library? that is, respond to issues about tuples and help resolve issues around tuples when there is a new typescript version? The changes you made could be useful in Vega-Lite as well. |
Sure,
to the best of my abilities... ;)
…On Thu, Jun 7, 2018 at 7:21 PM Dominik Moritz ***@***.***> wrote:
I see. Well, let me ask then, would you be willing to help me maintain
this library? that is, respond to issues about tuples and help resolve
issues around tuples when there is a new typescript version? The changes
you made could be useful in Vega-Lite as well.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA7VrchDQg_e7LdEWBlXz8nXM97kiBZeks5t6WEqgaJpZM4UabOI>
.
|
Sweet. Can you send a PR with |
With the `--strictTuples` option enabled, the generated schema does not allow for additional properties. See issue #28
Hi,
when generating a schema for a tuple-like structure, I noticed some issues:
generates a schema that allows for additional values, while it shouldn't.
also,
requires at least three values, while it should require at least 2 and at most three.
Anyways, great project.
The text was updated successfully, but these errors were encountered: