The catalog indexes 127,757 JSON Schemas, and most never say which fields are required

The catalog indexes 127,757 JSON Schemas, and most never say which fields are required

The schemas collection holds 127,757 JSON Schema pages across 3,363 providers. It is where an integrator or an agent learns what an object actually looks like. Read the 113,666 schemas whose source JSON parses cleanly, and one finding outweighs the rest: 62.7% of them never use the required keyword, not at the top level and not in any nested object.

Why required is the keyword that matters

A schema without required describes every field as optional. For a response, that means a client cannot rely on any field being there. For a request, it means a caller, human or agent, learns what it must send only by failing. An agent generating a call from a schema will send the minimum it is told to send, and here it is told nothing.

eBay shows the gap in miniature. Its AcceptPaymentDisputeRequest schema describes the revision field in prose as “This field is required.” The schema itself carries no required array. The rule exists, in a sentence a person reads, not in a keyword a validator enforces. eBay publishes 471 schemas on the network and none of them uses required.

Provider Schemas With required
eBay 471 0
Mindbody 351 0
Elexon 292 0
Small Improvements 246 0
Tyk 213 0

Those are the largest of 392 providers whose entire schema set never states a required field.

The rest of the rigor

required is not the only thin signal. Across 699,918 properties, 51.5% carry a description, so half the fields on the network have a name and a type and nothing else. 23.3% of schemas constrain a value with enum or const somewhere. Only 6.2% close the top-level object with additionalProperties: false, which is the one line that lets a validator catch a misspelled field instead of silently ignoring it.

Dialect is the tidiest part of the picture, and much of that tidiness is ours. 103,280 schemas declare JSON Schema 2020-12, but a large share of the collection was extracted from providers’ OpenAPI documents, as the eBay schema’s $id of #/components/schemas/AcceptPaymentDisputeRequest shows. Read that number as largely a pipeline choice, not market adoption. The residue is more honest: 10,282 still declare draft-07, 224 draft-06, 90 draft-04, and openFDA’s 6 declare draft-03, a dialect published in 2010. Then there are the malformed ones: 72 schemas across 26 providers point at draft/2020-12 without the trailing /schema, Site24x7 uses a draft/07 URI that does not exist, and 291 declare no dialect at all.

What a good one looks like

Stripe Product is a compact model. Its 19 properties each carry a description, 11 are listed as required, nullable fields say so with ["string", "null"], the product type is an enum of good and service, and the id carries a pattern of ^prod_. It is not long. It is simply complete about what it promises.

Takeaway

Some of what the collection is missing already sits in documentation the providers wrote. eBay’s “This field is required” is one required entry away from being enforced. For the 392 providers with no required fields at all, adding them is the single edit that turns a schema from a description into a contract an agent can build a valid call from. Browse the collection at apis.io/schemas/.

← The apis.io Playground re-proves every example request nightly, but not the score that admitted it
Travel technology runs on distribution, and its distributors score thin →