react-json-form icon indicating copy to clipboard operation
react-json-form copied to clipboard

Support for schema with `patternProperties`?

Open askanium opened this issue 9 months ago • 1 comments

First of all, thanks for an awesome library.

Are there any plans to support dynamic object properties defined with patternProperties?

For instance, here is a basic example:

{
  "type": "object",
  "patternProperties": {
    ".*": {
      "type": "string",
      "enum": ["READ", "WRITE", "ALL"]
    }
  }
}

This validates an object with any key that has a value from the enum. However, rendering the corresponding UI fails with the following error:

Schema of type 'object' must have at least one of these keys: ['properties' or 'keys' or 'oneOf' or 'anyOf' or 'allOf']

askanium avatar May 16 '24 07:05 askanium