Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Web, API & dataMiddleOccasionalTheory

What can an OpenAPI document generate or validate, and what remains outside the contract?

Answer

It can describe operations, parameters, schemas, responses and security schemes, enabling validation and generated clients or tests. It cannot prove business-rule correctness, authorization policy, data persistence, performance or compatibility with undocumented consumers.

Strong answer includes

  • schema-driven checks
  • generation opportunities
  • clear contract limits

Practical example

A team auto-generates a contract test from the OpenAPI spec that catches when a response field's type silently changes from string to number, but it doesn't catch that a discount calculation returns the wrong amount for a specific business rule, since that logic isn't expressible in the schema at all.

#openapi#contracts#schema

Sources

OpenAPI Specification 3.2.0OpenAPI Initiative · API contracts, schemas and operation descriptions