From 7b3106ae058d8d3cbffc7489a819680dbc87a632 Mon Sep 17 00:00:00 2001 From: Logan Volkers Date: Mon, 21 Jan 2019 15:53:53 -0800 Subject: [PATCH] Document a gotcha with `additionalProperties` (#1149) --- docs/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/index.md b/docs/index.md index e730cb43e4..e1550ef85d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -190,6 +190,8 @@ This component follows [JSON Schema](http://json-schema.org/documentation.html) You can also use `oneOf` with [schema dependencies](dependencies.md#schema-dependencies) to dynamically add schema properties based on input data. +* `"additionalProperties":false` produces incorrect schemas when used with [schema dependencies](#schema-dependencies). This library does not remove extra properties, which causes validation to fail. It is recommended to avoid setting `"additionalProperties":false` when you use schema dependencies. 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 - Custom field template: