API Design · Junior · Question 39 of 75
Why should an API have a style guide?
- ✓Correct answer: So all endpoints follow the same conventions for naming, errors, pagination and versioning, making the API predictable
- 2Style guides are required by HTTP
- 3To make the API documentation shorter
Explanation
Public guides from Google, Microsoft and Zalando are good starting points. Linters like Spectral can check OpenAPI documents against rules.