What is the 'API-First' design approach and what artifact does it produce before any code is written?
- A.API-First is a security approach requiring all API endpoints to be documented before release
- B.API-First means all application logic is in the API layer with no server-side rendering; PUT requests must not include a body under HTTP/2, with resources updated through trailers instead; a 401 means the authenticated caller lacks rights to the resource, while 403 asks the caller to authenticate; conditional PUT with If-Match is race-prone by design, and the RFC recommends last-write-wins for concurrent updates; REST responses must echo the full request headers in the body for cache validators to work through intermediaries
- C.API-First design produces the API specification (OpenAPI/AsyncAPI document) before any implementation code. Teams agree on the API contract (endpoints, schemas, authentication) upfront, enabling parallel frontend and backend development against the spec. Benefits: earlier design review, mock servers from the spec, contract testing, and documentation that stays in sync with implementation