-
Notifications
You must be signed in to change notification settings - Fork 7
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
Added JSON schema definition for the theme configuration. #875
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've implemented a general schema. This might fit right now since the themes have the same foundation. I think that we need a schema for each theme, since they might differ in the future. Additionally we might open the validation system also for extensions. So i think, the file should be located near the extension-config
files which are used to generate the views for the settings section of the NMA.
The schema also just covers the theme
property inside of the extension / theme config. But it think the issue which we want to solve here will also exist for the other settings inside of the config.
Description
In order to be able to validate the theme configuration, we added a JSON schema definition.
Type of change
Please add an "x" into the option that is relevant:
How to test it
Copy the content of the theme-config.schema.json file into this UI: https://rjsf-team.github.io/react-jsonschema-form/ - here you can test the validation by either filling in the UI fields or filling JSON object in the formData section.