-
Notifications
You must be signed in to change notification settings - Fork 65
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
additionalProperties would be nice #7
Comments
|
The readme is already quite clear that the package deals with only 4 keywords. The question is whether the number could be 5, 6, or 7 without violating the design tenets "uses a small subset of JSON Schema's capabilities", "does not try to guess user's data model", and "installs without dependencies". jsonschema.net supports user options to control generation without doing any guessing. I can submit a pull that adds support for additional properties, additional items, and merge properties, all controlled by user options as with the current merge arrays option. It also fixes a bug in merge arrays. But I won't bother if you consider "4 keywords" to be one of the design tenets. |
If it would be helpful to users, I'm all for it. TBH, I haven't had an occasion to work with JSON Schema in a while, so I feel a little out of touch with the pulse, but I'd love to get an updated version out there. I'll try to get to your PR soon, though it's not as high priority as the bug fixes. |
Hey, i try to find the way to enter this. |
The project description says:
3. The generated schema should be as strict as possible given the first 2 rules.
In order to meet that goal, schemas of type "object" should include an "additionalProperties" property. If the user generates a schema exclusively from json instances then this would always be false. If the user imports a schema with it true (by default or explicitly), then the true would take precedence over an instance-derived false without generating a conflict. Two schemas with opposite values would generate a conflct.
The text was updated successfully, but these errors were encountered: