DEV Community

Aleksander Sekowski
Aleksander Sekowski

Posted on

JSON Schema can express about one in seven OpenRTB 2.6 conformance statements.

JSON Schema can express about one in seven OpenRTB 2.6 conformance statements. The share is 14.5 percent. This note stays on that slice, and on how must, should, and may predict whether a sentence has a test. The four-class distribution is Table 1 of the preprint.

The figure is from my July 2026 preprint, How Machine-Checkable Is OpenRTB? Classifying the Normative Content of the Protocol That Clears Real-Time Advertising (doi:10.13140/RG.2.2.27937.57448). The PDF is public, and the research page collects the same text. The classification describes the specification. Production invalid rates are a separate study.

Class A, in the codebook, is a constraint expressible in JSON Schema draft 2020-12 against a single document: types, unconditional presence, enumerated values, ranges, lengths, and simple patterns. The example is small on purpose. "At least 1 Imp object is required." The checker compares one JSON value with a declaration, without a sibling field, an external list, or a second language embedded in a string. If that list were most of the specification, a schema beside the prose would finish the conformance job. It is 14.5 percent of the 2.6 statements.

The largest enforceable tranche is the next class, 39 percent of those statements, and it needs a rule engine. A schema is necessary and not close to sufficient.

The 39 percent lint tranche is conditional, exclusive, registered, or embedded

Class B is decidable from a single message, and it exceeds practical schema expressiveness. The preprint names four kinds of rule.

Conditional requiredness is a presence predicate. A field is mandatory only when some other fact in the same message holds. Unconditional presence stays in class A. A cross-field condition is class B. That split is why a generated schema feels strict on types and thin on the sentences whose presence depends on a sibling.

Mutual exclusion reaches across objects. A bid request with a DOOH object must not contain a site or app object. A validator decides that from the single message, which puts the prohibition past the unconditional slice.

Registry lookup is membership in a set the message does not carry. Inline enumerated values are class A, because the legal set is written beside the field. External registry membership is class B. The codebook's cases are ISO 4217 currency codes, BCP 47 language tags, and content taxonomies. The JSON type is a string either way. Conformance is membership in the external list.

Embedded markup is the creative carried inside the bid. Coherence between that markup and the rest of the single message is decidable by reading the message, and it is not a JSON type. The string can be well-formed and still be the wrong creative for the impression around it. The check is a lint over an embedded language.

The schema covers the 14.5 percent. The rule engine covers the 39 percent: conditional requiredness, mutual exclusion, registries, and embedded markup. I implement that rule layer in the open-source linter at rtblint.org. The preprint uses a rule engine as evidence that class B is enforceable in practice. How large each tranche is remains a property of the text.

Must statements are 61 percent statically checkable

Obligation strength predicts the column. On the OpenRTB 2.6 statements, must is the most enforceable modal. Sixty-one percent of must statements are statically checkable, and 16 percent are undecidable. Statically checkable means schema or lint together. The 61 percent is not a schema share, and the 14.5 percent figure is a share of all 2.6 conformance statements, not a cut of the must row. The preprint does not publish a schema-versus-lint split inside must.

A majority of must statements have a static test. Sixteen percent use the strongest verb in the document and still name nothing a machine can decide. Wording strength tracks the existence of a test. The 16 percent is what keeps those two facts from being the same fact.

Should is 102 of 200 statements, and a third of them are undecidable

Should is the least enforceable modal, and it is the largest cohort: 102 of the 200 OpenRTB 2.6 conformance statements. Thirty-three percent of should statements are undecidable. The specification's preferred way to write an expectation is the lowercase word should, and that construction is the one most likely to have no conformance test. A reader who treats should as a soft must, and then goes looking for the criterion, often finds a sentence with no threshold.

This matches the intuition behind RFC 8174, which reserves normative force for the uppercase keywords. Requirement strength that lives in ordinary prose diction drifts into ordinary prose vagueness. OpenRTB writes its expectations in that diction. After classification, the largest cohort is also the cohort with the higher undecidable share the preprint reports: 33 percent, against 16 percent for must.

Many should statements are presence recommendations a linter can warn on, and those land in the checkable columns. The 33 percent is the residue with no criterion. Because the cohort is 102 statements, that residue is a large piece of the document on its own.

Twelve of the 47 may statements are exclusivity prohibitions

The permission profile is bimodal. Some may-statements shape the grammar. Substitution macros may be included. Any object may contain extensions. Those are class A allowances. A schema that omits them rejects legal traffic, because the allowance is part of the grammar. Other permissions grant operational discretion, and those are undecidable by design. The text gave an operator a freedom. A single message has no test of whether the operator used it.

A validator that ignores permissive statements is wrong in the strict direction. It produces false rejections. That is the practical complaint that a validator does not work on real traffic: an allowance was left out, and messages the specification accepts then fail.

Twelve of the 47 may statements are exclusivity prohibitions of the form "only one of X and Y may be present." The surface verb is permissive. The force is prohibitive. I tagged them by the surface marker, so they sit in the permission row. Fourteen statements across the two specifications have this shape, and the other two are in OpenRTB 3.0. Moving the twelve into the obligation column would shift the may bar further toward class B. It would not change the ordering of the three rows.

None of those shares is a frequency in an exchange log. A should-statement with no criterion can ride on every bid and remain undecidable. The class belongs to the sentence.

The rest of the classification, the codebook, and the scripts are in the preprint. The obligation split and the statement labels are on ResearchGate, in the PDF, and with the extraction scripts at github.com/aleksUIX/rtblint/tree/main/paper/openrtb-checkability.

Top comments (0)