awesome-everything RU
↑ Back to the climb

APIs

OpenAPI: multiple-choice review

Crux Multiple-choice synthesis across the OpenAPI unit — spec-first vs code-first, contract drift, breaking-change gates, codegen, validation, and the 3.1 schema shift.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 13 min

Six questions across the whole unit. Each one is a call you make on a real API — not a definition to recite, but a decision about where the truth lives and how the pipeline keeps it honest.

Goal

Confirm you can connect spec-first vs code-first, contract drift, breaking-change gates, codegen, and edge validation into one enforcement story — the synthesis the lesson built toward.

Quiz

A team has a hand-written OpenAPI spec rendered to a nice docs portal. A teammate says 'we are covered against breaking changes.' What is actually missing?

Quiz

Your hand-written docs mark a field optional, but the running server now rejects requests that omit it. What is this, and what prevents it?

Quiz

A public API is consumed by mobile apps you cannot force-update and three external partners. Which enforcement strategy fits?

Quiz

You generate a TypeScript client from the spec and the result is full of any and loose untyped objects. What is the root cause?

Quiz

You upgrade the spec from OpenAPI 3.0 to 3.1. Which change is real and why does it matter?

Quiz

Which change to a request/response contract is backward compatible and safe to ship without a major version bump?

Recap

The unit’s through-line is one enforcement story: a spec is a contract only when CI makes it load-bearing. Spec-first vs code-first decides where the truth lives and whether the contract is reviewed before code, but neither escapes the gate — validate requests at the edge, diff every PR with oasdiff so breaking changes (new required field, removed response field, narrowed type) fail the build, and feed tight schemas to the generator so codegen yields strong types. OpenAPI 3.1 moves schemas to JSON Schema 2020-12, replacing nullable with type arrays. Unenforced, the spec drifts into fiction and breaks clients.

Continue the climb ↑OpenAPI: free-recall review
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.