koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
538 stars 154 forks source link

patternProperties not working #336

Open v-kay opened 2 years ago

v-kay commented 2 years ago

I want to display a form which should allow user to add name of the key and its value in a object like this { "key1": "value1", "key2": "value2" } User should be able to enter "key1" in first text input field and "value1" in second text input field. I have read somewhere that we can add this using "patternProperties". I have created this example but its not working/showing any button to add key/value pair. ` { "$id": "https://example.com/person.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Person", "description": "A few metadata about some person. Rendered as a form by vuetify-jsonschema-form.", "type": "object", "required": [ "firstName", "lastName" ], "properties": { "type": { "type": "string", "const": "person" }, "firstName": { "type": "string", "description": "sample desc", "x-class": "sm6 pr-4" }, "lastName": { "type": "object", "patternProperties": { ".": { "type": "string" }, ".": { "type": "integer" } } } } }

` I am testing this JSON schema using the link https://koumoul-dev.github.io/vuetify-jsonschema-form/0.x/?example=selects

albanm commented 2 years ago

This is not supported yet. I think it will be in the future, but I don't known when I will have the time to work on it.