Fundamentals · Medium · Free
What is an API contract? OpenAPI/Swagger role.
FresherFundamentalsSoftware Engineering & Tools
API contracts
For What is an API contract? OpenAPI/Swagger role., interviewers listen for a crisp definition, how the pieces interact in a real system, and one trade-off or failure mode you have seen or would guard against.
OpenAPI/Swagger documents paths, schemas, status codes—clients and servers agree before coding. Breaking changes need versioning.
Generate server stubs or client SDKs from spec in mature teams.