Middle
Contract descriptions — only in business language or also in OpenAPI (JSON, mandatory, patterns)?
sobes.tech AI
Answer from AI
Contract descriptions should be comprehensive: business language is important for understanding requirements and goals, while the OpenAPI specification (JSON or YAML) provides an exact technical description of the API.
In OpenAPI, the following are specified:
- Data types (string, integer, etc.)
- Field requirements (required)
- Patterns (regular expressions for format validation)
This allows developers and testers to unambiguously understand the structure of requests and responses, as well as automate validation and code generation.
Thus, business language sets the context and logic, while OpenAPI provides the technical specification that ensures accuracy and automation.