From 8fbb930b6f38e9d2d57850611e325baa06416db5 Mon Sep 17 00:00:00 2001 From: Logan Volkers Date: Tue, 28 Aug 2018 12:45:36 -0700 Subject: [PATCH] Document a gotcha with `additionalProperties` Relates to #848 #902 #992 (and maybe others). --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e2a7fbd1c5..b87274b887 100644 --- a/README.md +++ b/README.md @@ -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) ## Tips and tricks