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

Support for propertyNames key/value-objects etc #1765

Open
runar-indico opened this issue Jun 19, 2021 · 1 comment
Open

Support for propertyNames key/value-objects etc #1765

runar-indico opened this issue Jun 19, 2021 · 1 comment
Labels
Milestone

Comments

@runar-indico
Copy link

I am trying to set up a form from an object that is of type Record<string, string[]>. I'm not sure if this is already supported.

I've tried this schema (showing only the relevant part):

{
	"clients": {
		"additionalProperties": {
			"additionalItems": true,
			"description": "One or more valid password that can be used for client-authentication",
			"items": {
				"type": "string"
			},
			"minItems": 1,
			"title": "The clientId schema",
			"type": "array",
			"uniqueItems": true
		},
		"description": "The clients will authenticate via Basic Auth",
		"examples": [
			{
				"clientId": [
					"password1",
					"password2"
				]
			}
		],
		"propertyNames": {
			"maxLength": 100,
			"minLength": 3
		},
		"title": "As an alternative to other authentication, a simple map of client with clientSecrets can be supplied",
		"type": "object"
	}
}

Perhaps this only needs a custom renderer? I'm thinking it should act sort of like the Material-renderer does already with arrays, only that one has to provide the propertyName as well.

@sdirix
Copy link
Member

sdirix commented Jun 24, 2021

Hi @runar-indico, we don't support "dynamic" schemas out of the box, however you can definitely write a custom renderer which can handle this use case.

@sdirix sdirix added the feature label Jun 24, 2021
@sdirix sdirix added this to the Backlog milestone Jun 24, 2021
mirismaili added a commit to mirismaili/jsonforms that referenced this issue Dec 21, 2021
mirismaili added a commit to mirismaili/jsonforms that referenced this issue Dec 21, 2021
mirismaili added a commit to mirismaili/jsonforms that referenced this issue Dec 23, 2021
mirismaili added a commit to mirismaili/jsonforms that referenced this issue Dec 23, 2021
mirismaili added a commit to sabzco/jsonforms that referenced this issue Dec 23, 2021
mirismaili added a commit to sabzco/jsonforms that referenced this issue Dec 28, 2021
mirismaili added a commit to sabzco/jsonforms that referenced this issue Jan 12, 2022
mirismaili added a commit to sabzco/jsonforms that referenced this issue Jan 12, 2022
mirismaili added a commit to sabzco/jsonforms that referenced this issue Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants