sveltekit-superforms icon indicating copy to clipboard operation
sveltekit-superforms copied to clipboard

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

Open sukeshpabolu opened this issue 1 year ago • 1 comments

  • [x] Before posting an issue, read the FAQ and search the previous issues.

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

sukeshpabolu avatar May 27 '24 08:05 sukeshpabolu

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.

ciscoheat avatar May 29 '24 13:05 ciscoheat