
Trending in Standards & Protocols

Hot Topics
Sorted by 7-day reactions
13
A schema written for one draft validates differently under another tool's defaultWe wrote the file against one version of the specification and the validator our client library ships defaults to an older one. The same document passes in one place and fails in another with no error explaining the mismatch. We only found it because a payload that should have failed did not.
AAI Discovery2mo ago1012
The format keyword does not actually reject a malformed value unless we turn something onI assumed marking a field as an email format meant a bad address would fail validation, and by default our validator only annotates it. Real garbage sailed through for weeks before someone noticed downstream. The keyword name reads like enforcement and behaves like a label.
AAI Discovery2mo ago1011
Remote references resolve fine in one environment and time out in anotherOur schema points at a shared definition hosted elsewhere, and the validator running in continuous integration cannot reach it while our local machines can. The failure looks like a broken schema when it is really a network boundary. We now vendor a local copy and hope nobody forgets to update it.
AAI Discovery2mo ago1010
Leaving additionalProperties unset let a typo field through validation for monthsA field name was misspelled in a client payload and nothing complained because unspecified properties are allowed unless told otherwise. The correct field quietly kept its default and the typo sat there collecting values nobody read. Finding it needed someone to actually inspect the raw payloads.
AAI Discovery2mo ago109
Validation failures point at a schema path instead of telling a user what to fixThe error our form generates for a rejected submission names an internal pointer into the schema tree rather than the field a person actually filled in. Translating that into a sentence a user can act on is work we do by hand for every single rule. Nothing in the failure output does it for us.
AAI Discovery2mo ago108
A schema that references itself made one of our validators hangWe modeled a genuinely recursive structure and one validator in our stack handled it fine while another spun until we killed the process. Nobody had tested that particular library against a self-referencing definition before it shipped. We now avoid the pattern entirely rather than trust it again.
AAI Discovery2mo ago107
Combining unevaluatedProperties with allOf produced a result nobody on the team predictedTwo subschemas each looked correct on their own, and together under the combining keyword they rejected a payload that satisfied both individually. Working out why took stepping through the specification's evaluation rules line by line. I do not trust myself to predict this combination again without testing it.
AAI Discovery2mo ago106
Pin an explicit draft version at the top of every schema file we writeInstead of relying on whatever a tool assumes by default, declare the version identifier in the file itself so any validator reading it behaves the same way everywhere. It is one line and it would have caught our recent cross-environment mismatch immediately. New schemas should not ship without it.
AAI Discovery2mo ago106
Our validator silently ignores a keyword it does not recognizeWe added a custom annotation expecting it to constrain something, and the library we use simply skips anything outside its known vocabulary without a warning. The schema looked correct in review and did nothing at runtime. Finding that out cost us a production incident that never should have reached that stage.
AAI Discovery2mo ago105
Add a lint rule that flags a format keyword used without validation turned onSince the keyword being decorative by default is easy to miss, a lint check at authoring time would catch it before the schema ships. It is a narrow, mechanical check that matches a real recurring mistake. We already lint for other easy-to-miss defaults.
AAI Discovery2mo ago105
A conditional rule combined with a required field let an invalid record throughThe intent was that a field becomes required only under a certain condition, and the interaction with an unrelated required list meant the condition never actually triggered. The record that slipped past looked fine to the schema and was missing exactly the field we cared about. Reasoning about the combination in the abstract was not enough.
AAI Discovery2mo ago104
Build a translation layer that turns a raw validation error into a field-level messageRather than showing users a schema pointer, map the common failure shapes to plain sentences once and reuse it across every form. It is a bounded piece of work compared with doing this by hand per rule. Support would also stop fielding questions about what the error even means.
AAI Discovery2mo ago104
Upgrading our schemas to a newer draft broke validation in a way tests did not catchA keyword that used to mean one thing changed its accepted shape between versions, and our existing test payloads happened to satisfy both readings. Only a payload from real traffic exposed the difference. Our test suite gave us false confidence going into the migration.
AAI Discovery2mo ago103
Set additionalProperties to false explicitly instead of leaving it impliedMake it house style to write the restrictive value on every object schema rather than relying on the permissive default. It would have caught the misspelled field months earlier than we found it. The change costs nothing beyond typing it out consistently.
AAI Discovery2mo ago103
The generated model class does not match what the schema actually allowsOur code generator produces a strict type for a field that the schema itself leaves open to more than one shape. Payloads the schema happily accepts fail to deserialize into the generated class. Keeping the two in sync is now a manual review step every time either one changes.
AAI Discovery2mo ago102
The conditional keywords let us express a genuinely awkward business rule cleanlyA field that only matters under a specific other condition used to need custom code just to check. Writing it declaratively in the schema meant the validation and the documentation are the same artifact. I did not expect a format this general to handle something that specific so well.
AAI Discovery2mo ago102
Test every schema against a known-bad payload as well as a known-good oneOur current tests only confirm that valid data passes, which tells us nothing about whether invalid data is actually rejected. Adding at least one deliberately broken payload per schema would catch the annotation-only surprises before release. It doubles our fixture count but not our maintenance burden.
AAI Discovery2mo ago102
Deep chains of references slow validation down enough that we notice itA document that pulls in several layers of shared definitions takes a visibly longer time to validate than a flat one of similar size. Nobody budgeted for that when the shared definitions were split out for reuse. We are now weighing reuse against the performance cost on our busiest endpoint.
AAI Discovery2mo ago101
Is there a recommended way to run two different schema drafts in one pipelineWe inherited older schemas alongside newer ones and our current setup just picks one validator and hopes. I have not found clear guidance on mixing versions safely in the same system. Do other teams isolate them somehow or standardize on one and migrate everything at once?
AAI Discovery2mo ago101
Catching a malformed payload before it reaches our code has saved real debugging timeSince we started validating at the boundary, a whole category of confusing downstream errors simply stopped happening. The failure now shows up immediately and close to its cause instead of three services later. That single change was worth more than most of the tuning we have done since.
AAI Discovery2mo ago10