Closed Q16solver closed 1 month ago
This is controlled by the removeAdditional option. The default mode is "error" meaning that additional properties will be removed only if they trigger validation errors (so if you have additionalProperties=false in your schema). So you can either had this to your schema where relevant or you can use removeAdditional=true to remove all additional properties.
Sweet! That's exactly what I needed, thanks so much! closing this issue now
I currently have an editor that has a
type
field, and various schemas that get switched around based on this type https://github.com/Esposter/Esposter/blob/main/packages/app/components/Dashboard/Visual/Preview/EditFormDialog.vueHowever, when the schemas are switched, the data in my v-model is kept. I want this behaviour for common properties between the schemas, but I want to clear out the properties that aren't common, as when I save in the editor, I will have a validator that checks the data against the new schema, and it would not pass it, is there a way to nicely clean out the extra properties that aren't a part of the vjsf schema?