A schema describes an expected data structure or set of constraints; a type identifies a kind of value or entity under a particular system; a contract specifies agreed obligations and observable behaviour; an interface provides a defined way to interact; and a protocol supplies rules for communication between participants. The words overlap in software development, but they are not interchangeable. A record can pass its JSON Schema and still contain a false claim. An interface can accept a valid request without granting the caller permission to complete its intended action. A protocol can deliver messages correctly while the organisations behind them interpret “approved” differently.
Before integrating systems or trusting an AI-generated instruction, identify the data, permitted values, message format, interaction rules, authority, error behaviour and evidence needed to confirm an actual outcome. Then zoom from one form field to a website, financial transaction, connected AI tool, international exchange of information and future digital archives. Technical standards give useful precise conventions, but they do not automatically validate every real-world fact or social obligation. The responsible approach preserves the distinction between valid representation, permitted operation and justified interpretation.
- Schema: Which fields, shapes, constraints or relationships must the data satisfy?
- Type: Which kind of value or concept is being represented, under which system?
- Contract: What does each party promise or require, and within which scope?
- Interface: Through which operations may another component interact with the system?
- Protocol: How should participants exchange and interpret the relevant messages?
- Safety: Successful parsing does not prove authorisation, factual accuracy or completion.
- Practical test: Verify the specification, boundary cases, source version and actual tool result.
Chapter Index
- 1. Five Layers Behind One Digital Message
- 2. Use a Simple Application Form to See the Difference
- 3. Established Standards and Their Real Boundaries
- 4. Type Safety, Business Meaning and Authority
- 5. Compatibility Is About More Than Parsing
- 6. Natural Language Is More Difficult Than a Programming Schema
- 7. Worked Examples From Individual to Global Scale
- 8. A Seven-Question Audit and Seven-Day Exercise
- 9. Frequently Asked Questions
1. Five Layers Behind One Digital Message
What is a schema?
A schema is a specification describing expected structure, properties, relationships or constraints. A customer record might require an identifier and allow an optional contact preference. A knowledge graph can use shapes to validate its structure. The word is broader than one file format. A schema answers questions about what a representation should look like and which values are permitted. It does not automatically answer whether a name belongs to the right person or whether the recorded transaction genuinely occurred.
What is a type?
A type classifies a value or entity under a particular modelling system. A JSON value may be a string, number, boolean, object, array or null. In other languages, a type system can express more elaborate constraints. JSON Schema’s type guide explains its supported type distinctions. A field having the type string does not mean its contents are a valid date, an accurate address or a lawful instruction. Classification is useful precisely because the expected type is narrower than everything people might imagine.
What is a contract?
A contract in software may be an explicit or implied agreement about valid inputs, effects, outputs, errors and compatible behaviour between components. This use of the word is an engineering metaphor and need not be a legally enforceable agreement. A legal contract, by contrast, has effects determined by applicable law and parties. “If you send a valid request, we return an identifier” describes part of a software interaction contract; it does not establish that a public authority approved whatever the identifier names.
What is an interface?
An interface describes how one component or person interacts with another. An application programming interface (API) offers defined operations, parameters, responses and access paths. A human-facing form is also an interface in a broader sense, though it is not the same thing as an API. The interface may expose only some of a system’s internal capabilities. Its documentation should say what operations are supported, what permissions apply and how outcomes are confirmed. The ability to submit a request is not identical to the authority to complete its intended action.
What is a protocol?
A protocol specifies rules governing communication, including message semantics, interactions and expected responses. HTTP Semantics, RFC 9110, describes how clients send requests to servers and interpret response messages. A protocol may be implemented by different software systems. It need not specify every business rule layered on top. Successful HTTP communication does not prove that a user is eligible for a service; it shows what happened under the particular network and application semantics.
Why these are not five synonyms
A type can be part of a schema; an API interface can be described in a specification; a protocol can govern the messages moving through that interface; and a contract can impose requirements beyond the format alone. These relationships are useful but not identities. A contract about refunds might incorporate conditions that are absent from a JSON Schema. An API response may have the correct type while a business rule was misapplied. Keep the layers separate so the next reviewer knows which promise was actually tested.
2. Use a Simple Application Form to See the Difference
The input contains a date
Imagine an application requesting a date of birth. The form may store it as a string under a defined format. A schema can check whether a field is present and whether its value satisfies a pattern. But passing a pattern does not prove the birth date is true. That requires an appropriate evidence procedure when the task warrants it. The field’s format, syntactic validity and factual accuracy are three separate properties with potentially different reviewers.
Required does not mean non-null
JSON Schema’s object reference explains that the required keyword demands property presence; it does not by itself determine whether a null value is allowed. The type rule must address that separately. Thus a missing property, a present property set to null and a present property containing an empty string can have different meanings. A software engineer who collapses those states may misclassify an unanswered question as a definite negative or a completed response.
Valid data can describe an ineligible applicant
A form can be perfectly well-formed while an applicant fails a legitimate age or residence criterion. The schema might validate the record’s structure without applying the programme’s full eligibility rules. An automated decision should identify the governing requirements separately and preserve their effective date. An application that receives a document is not the same as an authority that grants final approval. Correct vocabulary prevents “accepted upload” from becoming “approved application” in public messages.
An interface exposes a submission operation
The public service may provide an API operation called submitApplication. Its interface description can specify the expected request body and response codes. OpenAPI Specification 3.2.0 is a language-agnostic way to describe HTTP APIs. It helps people and computers discover supported capabilities. However, a description is not proof that the service is available today or that a caller is authorised under current law. The interface remains one layer of the complete service.
The response code has limited semantics
HTTP status codes have defined protocol meanings. A successful response may indicate that a request was fulfilled according to the method and response status, while particular accepted-processing responses can leave work pending. RFC 9110 provides the governing protocol details. A business application must still explain which event the response confirms. An HTTP success is not an all-purpose certificate that the client’s hoped-for real-world outcome occurred.
A contract must specify exceptional cases
An application may reject expired documents, require an additional reviewer or retry after a transient fault. The client needs to know which errors are recoverable and which decisions are final. These details form part of the effective interface or service contract. If documentation says “submission succeeds” but does not distinguish received, validated, under review and approved, downstream systems may invent assumptions. A useful contract includes error and uncertainty states rather than only a happy-path example.
3. Established Standards and Their Real Boundaries
JSON Schema validates a defined shape
JSON Schema can require properties, constrain types and express other conditions, depending on the vocabulary and draft in use. A validator determines whether an instance satisfies the applicable schema. It does not establish that the source was trustworthy or that the values describe reality accurately. This distinction matters for AI output validation: producing valid JSON is useful, but the generated facts and implied decisions must still be checked against appropriate evidence.
OpenAPI describes an HTTP service
The OpenAPI Specification defines structured descriptions of HTTP interfaces. It can specify paths, operations, parameters, security schemes and schemas for requests or responses. A client may use that description to interact with a service. The specification does not automatically make every implementation correct or every operation legal. A deployment may differ from its published description, and the service’s business rules can change. Contract testing and version management remain important.
SHACL checks RDF graph constraints
W3C SHACL validates an RDF data graph against a shapes graph. A rule might require a property, constrain a datatype or restrict relationships. A validation report can identify structural problems. That does not prove that the data graph is complete or factually true. A graph recording an incorrect approval can still conform to the shape specifying how approvals must be represented. Conformance and real-world evidence require separate checks.
HTTP is a communication protocol, not a universal policy
A browser may request a webpage and receive a correct HTTP response. The protocol describes how messages are exchanged and interpreted at that level. The content may still be misleading, inaccessible to particular readers or subject to legal restrictions. Similarly, a valid request to a payment API is not proof that money was transferred. The user’s goal is a business event; the transport protocol provides one means of interacting with the service. Distinguish the two in reports and UI messages.
Formal validation depends on the rule chosen
A system that checks a required property can pass or fail according to that requirement. It does not decide whether the requirement is appropriate. An eligibility schema based on an obsolete policy may correctly reject current applicants under the wrong rule. The real audit must examine the authority and date of the rule as well as the implementation. Software can be consistent yet wrong. A green validation result should name the standard and tests rather than imply universal trustworthiness.
Normative words belong to their specification
MUST, SHOULD and MAY can carry defined meanings when a specification explicitly adopts the relevant IETF convention. In ordinary language or a different contract, their force may be interpreted differently. Do not assume that capitalisation alone creates a legal obligation. A useful crosswalk records the governing specification and audience. The previously published guide to MUST, SHOULD and MAY explains why requirement words need their own context and authority.
4. Type Safety, Business Meaning and Authority
A string is not automatically an identifier
A user ID may be stored as a string, but that does not mean any string names a valid user. Additional rules may control format, uniqueness and reference integrity. A mistaken identifier can connect one person’s records to another’s. Stronger application-level types may help prevent accidental mix-ups, but actual identity still needs appropriate evidence. A type system can rule out selected invalid operations; it cannot independently verify every real-world relationship that a value purports to represent.
Numeric values need units and interpretation
A field of type number might hold a temperature, distance, account balance or confidence score. Without a unit and definition, a value such as 50 is ambiguous. A schema can constrain a number to a range but not infer what 50 means. Scientific measurement needs a defined quantity and suitable uncertainty information. Financial calculations need currency and relevant accounting rules. Adding the correct type is only the beginning of giving the value a reliable meaning.
A boolean can conceal unfinished work
A field called approved might allow only true or false, even though real workflow states include pending review, withdrawn and unable to verify. A boolean schema can enforce tidy data while hiding important uncertainty. The repair may be an explicit status enumeration with documented transitions rather than guessing that missing means false. The right representation follows the domain’s actual process. A neat type should not force an authorised human decision to be invented before it occurred.
Permission is not a value type
A client can send well-formed JSON and still lack permission to perform the operation. Authorisation determines whether a party may act. Identity proofing, authentication and access control can be separate processes. A type checker is not a substitute for those controls. The digital identity and authorisation guide explains why a successful login or valid credential does not confer unrestricted power. Security checks belong at the actual action boundary.
Evidence and format are different layers
A claim such as “the bridge was inspected” might be stored in a structured record with a valid date and inspector identifier. The presence of those fields does not demonstrate that the physical inspection happened. A reliable process may need an authenticated inspection report, evidence of completion and a correction mechanism. The schema can help collect that evidence, but it cannot make missing evidence appear. An organisation should not describe a validated form as a verified real-world event.
5. Compatibility Is About More Than Parsing
Schema evolution can break consumers
A provider may rename a field, alter its type or make an optional property required. Existing software may no longer parse valid new messages. Compatibility testing should include both current and older supported clients under the published interface contract. But even a structurally compatible change can alter meaning. Reusing a field called active with a new inclusion rule can silently change reports while parsers continue working. Semantic compatibility requires checking decisions, not merely schemas.
Version numbers do not automatically guarantee safety
A provider may use major, minor and patch version numbers under its own convention. Semantic Versioning gives rules for APIs adopting that specification, but a version number alone does not describe the actual change. Review the published contract, compatibility notes and tests. A documentation typo fix is different from changing a payment response’s business meaning. A responsible migration makes the impact visible and retains a way to understand historical messages.
Backward compatibility is not forward compatibility
A new client may understand older messages, while an old client may not understand new fields or new meanings. Some protocols define ways to ignore unknown extensions; other interactions require strict validation. The supported behaviour must be stated rather than assumed. “Compatible” without direction, versions and operations is incomplete. A migration plan should test representative cases in both directions where necessary and account for clients that cannot be updated immediately.
The same field name can change meaning
Imagine a status field called completed originally means a file passed technical validation. A later version uses completed to mean publicly published. The JSON type and key remain identical, yet downstream decisions change. A report grouping both versions would be misleading. Versioned semantic definitions and test cases are as important as field compatibility. This is the problem sometimes described as semantic debt: unresolved meanings accumulate costs beyond their initial convenience.
Consumer-driven tests have a specific scope
A client can test the requests and responses it expects from a service, checking whether changes break those assumptions. Such testing can be valuable, but only covers the tested interactions. It does not establish that every other consumer or policy remains unaffected. Tests should include errors, absent fields and edge cases where meaningful. A passing test is evidence about a defined contract, not proof that the whole system is correct for every audience or condition.
Interface documentation can be stale
A public API description may be updated later than the running service, or a deployed version may differ from the latest documentation. A client should verify the actual target deployment and its advertised version. A generated SDK can correctly follow an outdated schema while sending inappropriate requests to a newer endpoint. The problem is not solved by better code formatting alone. Maintain source and deployment references, and test the real interface before relying on its claims.
6. Natural Language Is More Difficult Than a Programming Schema
Human instructions are not JSON objects
A person might say “approve the latest request” while several requests are visible. The intended target, authority and condition may be unstated. A schema can force a tool call to contain a numeric ID, but it cannot determine whether the assistant chose the correct ID. A responsible workflow resolves ambiguity before a consequential action. The schema is a useful guardrail for representation, not a replacement for understanding what the user authorised.
A protocol does not resolve social context
People exchange greetings, promises, apologies and instructions according to culture and relationships. Their meaning depends on far more than message syntax. A formal communication protocol can specify machine interactions precisely, but cannot automatically determine the emotional or social force of every human sentence. The syntax, semantics and pragmatics guide explores those layers. Technical structure is helpful without being a universal interpreter of human intent.
Universal translation needs concept mappings
A language may express a legally consequential category with a phrase rather than a single word. A shared schema can carry a concept identifier, date and governing jurisdiction so translations preserve relevant distinctions. But no format guarantees that every cultural or rhetorical nuance survives. Human review may still be needed. The best representation acknowledges missing exact equivalents and records source labels rather than forcing all communities into one ambiguous English field.
Schema validation is not legal approval
An online application can pass every required-field test yet remain subject to evidence review and legal eligibility conditions. Using “validated” to mean “approved” can mislead applicants. The source of the rule, institution with decision-making authority and stage of the process should be explicit. A content system can similarly validate an article’s structure without verifying its scientific claims. Appropriate labels help readers know which work is genuinely finished and which remains pending.
A semantic compiler remains a proposal
One possible engineering approach is to parse a human instruction into structured roles, conditions and permissions before execution. The article on semantic compilers develops this proposal. Such a system could use schemas, decision models and tool permissions. It cannot legitimately claim to compile every unrestricted human sentence into a perfectly faithful executable program. Ambiguity, authority and facts must remain visible for review.
7. Worked Examples From Individual to Global Scale
Personal scale: a form rejects an address
A registration form might reject an address because its schema expects a particular format, even though the person’s real address is valid. That is a representation or design mismatch, not evidence that the person does not live there. A useful error message should identify the actual constraint and an appropriate correction route. Blindly forcing users to supply invented fields can turn a software requirement into a false personal record. Practical design should respect legitimate variations in real-world data.
Team scale: a task is marked complete
One team sends a message labelled complete after review. Another expects the item to be publicly delivered. The interface successfully exchanges the field, but the service contract lacked a common definition. A repair might introduce reviewed, authorised and delivered as separate statuses with documented transitions. This example shows why interface compatibility is not enough. Both systems can technically communicate while misunderstanding the consequence of the same status label.
International scale: two regulators share data
Two agencies may use a translated term resident while applying different statutory criteria. Their systems can exchange well-formed JSON through a common HTTP interface, yet exact category matching remains unjustified. A proper exchange records the applicable legal definition, time, source and purpose. A concept crosswalk can distinguish related categories without merging them. Interoperability means supporting understandable exchange, not erasing legitimate differences in rules and histories.
AI scale: a valid tool call changes the wrong record
A model produces perfectly valid JSON for an update tool, including a record ID and new status. But it selected the wrong ID because it misinterpreted “the latest submission”. The schema worked. The user-intent interpretation failed. External permission checks and confirmation can reduce the consequences, while an audit trail preserves what happened. Tool validity is a necessary condition for many actions, but rarely sufficient to prove that the right thing was done.
Historical scale: a specification survives its implementation
An archive might preserve a protocol specification after the original service has been retired. Future researchers can understand the message shapes, but may still need contextual notes explaining operational statuses and practices of the time. Keeping an interface description alongside source files, examples and version histories makes the archive more interpretable. A durable representation supports inquiry without guaranteeing that every historical meaning can be recovered perfectly.
8. A Seven-Question Audit and Seven-Day Exercise
Seven questions for a technical promise
- Which layer is being described: type, schema, contract, interface or protocol?
- What exact input, output or state is within its declared scope?
- Which standard or version defines its terms?
- Does a successful check demonstrate structure, operation, authorisation or factual correctness?
- Which errors, unknown values and exceptions have been tested?
- What changes would break current or historical consumers?
- How can a mistaken result be investigated and corrected?
Day one: classify the five terms
Choose a fictional online registration service. Write separate sentences defining its data type, schema, interface, protocol and service contract. Avoid using the five words as synonyms. Identify which sentence a user needs to know when an address is rejected and which a developer needs when a response changes format. This exercise makes the layers visible without requiring a real system or personal data.
Day two: examine required and optional fields
Read the JSON Schema object guide and compare an absent property with a property set to null. Then write three imaginary records: valid, invalid and uncertain under the selected domain rule. A record can conform structurally while containing an unverified fact. The point is to see the boundary between formatting checks and actual knowledge, not merely to memorize syntax.
Days three and four: describe and test an API
On day three, read the opening of the OpenAPI Specification and sketch a harmless service with one query operation and one command. On day four, add two failure responses and an access-control check. Distinguish request acceptance from confirmed business completion. No live accounts or payments are needed. A hypothetical example is sufficient to expose the different meanings.
Days five and six: test meaning-changing compatibility
Change a sample response field from “under review” to “approved”, keeping its data type unchanged. Ask whether older clients would parse it and whether they would interpret it correctly. On the next day, reverse the example: keep the meaning but change the representation in a way older clients cannot parse. Explain why syntactic and semantic compatibility are different. Document a migration plan rather than declare either change universally safe.
Day seven: create a layered glossary
Write a compact glossary for the fictional service including definition, source, permitted operations, examples, exclusions, effective date and owner. Provide a case where data validation passes but real-world approval is absent. The final product should let a reader understand the limits of each technical promise. This is a foundation for dependable communication, not a claim to have built a complete universal language.
9. Frequently Asked Questions
Is a schema the same as an API contract?
No. A schema can form part of a contract, but a contract may also cover behaviour, errors, authentication, authorisation and other guarantees not expressed in the schema.
Does valid JSON mean a request is authorised?
No. Parsing or validating data does not grant permissions. The receiving system must enforce appropriate access and domain rules.
Is an interface the same as a protocol?
No. An interface describes available interactions, while a protocol defines communication rules. A specific interface may operate over a protocol such as HTTP.
Can software pass all type checks while making a wrong decision?
Yes. It can apply an incorrect policy, use false inputs or act on the wrong object. Types and schemas check selected constraints, not universal factual truth.
Does OpenAPI guarantee a deployed API behaves as described?
No. OpenAPI is a specification for describing HTTP APIs. Actual implementations and current deployments require testing and verification.
Could one universal schema remove ambiguity from human language?
No. Structured representations can improve consistency for defined tasks, but human context, cultural variation, authority and uncertain evidence remain relevant.
Continue the Vocabulary at Every Zoom Level
- What Is Vocabulary | Standards, Rules, Protocols and Laws
- What Is Vocabulary | Rules as Code and Human Oversight
- What Is Vocabulary | Semantic Compiler and Safe AI Actions
- What Is Vocabulary | Zero, False, Null, Missing and Unknown
- What Is Vocabulary | Open-World, Closed-World and Unknown Facts
- What Is Vocabulary | Why MUST, SHOULD and MAY Differ
Companion Articles in This Batch
Follow the next three connected lessons on information identity, system contracts, authoritative sources and the boundary between measurement and inference. Each guide examines a different way that a small change of words can affect a real decision.
- Canonical, Identical, Equivalent, Duplicate and Similar
- Source of Truth, Replica, Cache, Backup and Archive
- Observation, Measurement, Estimate, Inference and Prediction