JSON Schema in fdoc
We added a small patch to help error messages be more descriptive, and it was merged upstream. It's a useful tool, and we like to contribute back anything we can.
In our usage, the most valuable part of API documentation is what keys are and what they mean. By default, JSON schema does not care about extra keys, but it can if a schema's
additionalProperties key is set to
At Square, our desired behavior is throw an error when a new property is detected in the schema to verify, indicating the documentation needs updating.
To achieve this, fdoc's verification methods will, in memory, modify schemas to default
false (unless specified).