cern-sis / react-formule

User-friendly, extensible form builder for React based on JSON Schema and RJSF
https://cern-sis.github.io/react-formule/
MIT License
7 stars 3 forks source link

Add cleanup function to remove unnecessary fields from schemas #48

Open miguelgrc opened 1 month ago

miguelgrc commented 1 month ago

Add a function to be run likely after every change in the schemas that removes unnecessary fields (i.e. fields with default values like "ui:label": true) so that we don't pollute the schemas with useless information. This can be done by iterating through the schemas in a smart and efficient way and check the jsonschema specification and/or a custom defaults object to discard those values that are unnecessary.