API Testing · Senior · Question 69 of 75
What is the benefit of generating client SDKs from the OpenAPI spec in tests?
- 1Typed clients expose mismatches between spec and server
- 2Generated SDKs make the API respond faster in tests
- 3SDKs remove the need to assert any responses
Show the answer
Correct answer: Typed clients expose mismatches between spec and server
Explanation
If the server returns a field type the spec doesn't allow, typed clients or response validation fail loudly.