Skip to content
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

Document a gotcha with additionalProperties #1018

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,7 @@ This component follows [JSON Schema](http://json-schema.org/documentation.html)
* `anyOf`, `allOf`, and `oneOf`, or multiple `types` (i.e. `"type": ["string", "array"]`
Nobody yet has come up with a PR that adds this feature with a simple and easy-to-understand UX.
You can use `oneOf` with [schema dependencies](#schema-dependencies) to dynamically add schema properties based on input data but this feature does not bring general support for `oneOf` elsewhere in a schema.
* `"additionalProperties":false` when used with [schema dependencies](#schema-dependencies) will not remove the extra properties and produce invalid schemas. It is recommended to avoid setting `"additionalProperties":false`. See [#848](https://github.com/mozilla-services/react-jsonschema-form/issues/848) [#902](https://github.com/mozilla-services/react-jsonschema-form/issues/902) [#992](https://github.com/mozilla-services/react-jsonschema-form/issues/992)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the wording here? I can't tell if this means "will not remove the extra properties and will produce invalid schemas" or "will not remove the extra properties and will not produce invalid schemas"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can you make your change in the docs directory instead of the README? Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing! I'll create an fresh pull request since this one is a bit stale from your new changes.

Also FYI both @jericmason work for saasquatch.com and would be happy to help contribute regularly to this project in any way. We have 4-5 developers that spend every day building using this library.

Copy link
Member

@epicfaace epicfaace Jan 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that's great! Let me know what kind of feature ideas / bugs you come across; I'll try to be as responsive as possible to new ideas / PRs.


## Tips and tricks

Expand Down