The Specification Sandwich

An earlier post, Modern API Development with TypeSpec and OpenAPI , covered generating a typed HTTP boundary from a TypeSpec schema: OpenAPI in the middle, oapi-codegen on the Go backend, and a typed client on the frontend. That post stopped at the handler. The handlers had generated request and response types, but the other side of them was still hand-rolled. In the example, the search model came from a models package that someone had to write and keep aligned with the database by hand. ...

September 10, 2026

Modern API Development with TypeSpec and OpenAPI

Designing clear, well-documented web APIs is a big part of building software. The most widely adopted standard for describing RESTful APIs is OpenAPI, a machine-readable format (usually JSON or YAML) that defines an API’s structure, endpoints, and request and response shapes. That schema becomes the single source of truth behind your interactive docs, client libraries, and server stubs. However, writing and maintaining OpenAPI specifications by hand can quickly become a chore. The syntax is verbose, and small mistakes in the structure can lead to frustrating bugs or inconsistencies across different parts of the system. ...

April 24, 2025