Closed brian-statsig closed 2 months ago
What version of Ajv are you using? Does the issue happen if you use the latest version? latest version
Ajv options object no options
JSON Schema
{ "properties": {} }
Validation result, data AFTER validation, error messages
TypeError: Reduce of empty array with no initial value
Code
const ajv = new Ajv(); ajv.compileParser({ properties: {} });
What results did you expect? A compiled schema that passes nothing or everything. I think more graceful handling would be nice
If you want to validate JSON Type Definition schemas you need to invoke Ajv differently (see top of page).
import Ajv from "ajv/dist/jtd" const ajv = new Ajv()
What version of Ajv are you using? Does the issue happen if you use the latest version? latest version
Ajv options object no options
JSON Schema
Validation result, data AFTER validation, error messages
Code
What results did you expect? A compiled schema that passes nothing or everything. I think more graceful handling would be nice