Schema Validation
Schema validation checks that data conforms to a predefined structure — required fields present, correct types, values within allowed constraints — automatically rejecting or flagging anything that doesn't match, rather than relying on manual, field-by-field inspection.
It's used on both sides of an API relationship: validating incoming requests before they reach business logic (rejecting malformed input early, with a clear error, rather than letting it cause confusing failures downstream), and validating outgoing responses in tests to confirm the API's actual output matches its documented contract.
JSON Schema is the most common format for REST APIs; GraphQL has its own built-in schema and type system serving a similar purpose natively. Either way, schema validation turns "does this data look roughly right" into an automated, precise, repeatable check.