OpenAPI and JSON Schema Divergence: Part 1
philsturgeon.uk
philsturgeon.uk
Is reading code snippets that difficult? For a short validation program, a machine could certainly infer if a type would be accepted (just run the validation).
I know that a declarative format seems like the right choice, given validation in mainstream programming languages is expressed declaratively via the type system, but these standards, to me, often seem to only translate awkwardly an implicit validation program into a very verbose declaration.
[0]: https://en.m.wikipedia.org/wiki/Total_functional_programming
The $ref resolution, as defined in the spec, is hideously complicated, to the point where many implementations just don't even bother supporting external $refs. It feels like it really should be a totally separate concern from validation, especially since how you store and compose schemas may end up being somewhat specific to a given use case.
The errors I've run into are more alongside implementation details like: `number` being interpreted as a float (not a decimal) which makes it's related property `multipleOf` erroneous.