ciscoheat / sveltekit-superforms

Making SvelteKit forms a pleasure to use!
https://superforms.rocks
MIT License
2.11k stars 62 forks source link

Support definitions and references ($ref) in JSON Schema validation #436

Open sukeshpabolu opened 3 months ago

sukeshpabolu commented 3 months ago

Description Facing an exception while validating data with simple json schema. If applicable, a MRE minimal reproduction

ciscoheat commented 3 months ago

This is because definitions and references ($ref properties in the JSON Schema) aren't supported by Superforms. The JSON Schema part needs to be rewritten for this to work. The workaround for now is to resolve the references yourself before using a JSON Schema with the schemasafe adapter.