hack-json-schema
hack-json-schema copied to clipboard
Generate Hack JSON Schema validators based on a JSON Schema.
Right now it does something like: ``` public static function check(mixed $input, string $pointer): blocks_suggestions_callback_validator_properties_unfurl_t { $typed = Constraints\ObjectConstraint::check($input, $pointer, self::$coerce); $output = dict[]; return $typed; } ``` we shouldn't...
Right now we iterate through all schemas and test if the input failed any. We don't report all the errors that it failed on so could just be exiting on...
- [ ] `date-time`, eg: `2018-11-13T20:20:39+00:00` - [ ] `time`, eg: `20:20:39+00:00` - [ ] `email`, eg: [RFC 5322, section 3.4.1](http://tools.ietf.org/html/rfc5322#section-3.4.1) - [ ] `idn-email"` [RFC 6531](https://tools.ietf.org/html/rfc6531) - [ ]...
https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values
- [ ] `minProperties` - [ ] `maxProperties` - [ ] `dependencies`
https://json-schema.org/understanding-json-schema/reference/conditionals.html
Right now to do this we list it as required as well as having a default. It shouldn't need to be listed as required.
JSON schema supports defining multiple non-structured data types in the `type` field. ie: `"type": ["string", "null"]`.