Intermediate
Web & Software Development
Q75 / 100
What is the main benefit of writing API documentation using a specification format like OpenAPI (Swagger)?
Correct! Well done.
Incorrect.
The correct answer is D) It provides a machine-readable contract describing endpoints, request/response shapes, and authentication, enabling auto-generated docs, client SDKs, mock servers, and contract testing
D
Correct Answer
It provides a machine-readable contract describing endpoints, request/response shapes, and authentication, enabling auto-generated docs, client SDKs, mock servers, and contract testing
Explanation
OpenAPI describes an API in a structured, machine-readable YAML/JSON document. Tooling can then generate interactive documentation (Swagger UI), client libraries in multiple languages, mock servers for early frontend development, and contract tests that verify the implementation matches the spec.
Progress
75/100