code generation
Producing client or server code automatically from a machine-readable contract such as an OpenAPI document or a Protocol Buffers file.
In more detail
Generated clients keep callers in step with the contract, which is one reason stable, predictable names matter. gRPC depends on generation for every language it supports.
Related terms
- OpenAPI — A standard, language-neutral format for describing an HTTP API: its paths, operations, parameters, request and response schemas, errors and security.
- Protocol Buffers — A language-neutral way to define data structures and services in .proto files and encode messages in a compact binary format.
- gRPC — A high-performance remote procedure call framework that generates client and server code from Protocol Buffers definitions and runs over HTTP/2.
- Orval — A tool that reads an OpenAPI document and generates typed TypeScript API clients and TanStack Query hooks.
- SDK — A software development kit: a bundle of tools, libraries and documentation for building software against a platform or service.
- tRPC — A TypeScript framework that lets a frontend call backend procedures with full type safety by sharing the server’s types, with no code generation.
- schema drift — Copies of the same data shape slowly becoming different as one is changed and the others are forgotten.
Taught in
- Naming Resources And Collections — Modern API Architecture: REST, GraphQL & gRPC
- OpenAPI And Design-First — Modern API Architecture: REST, GraphQL & gRPC
- When Each Wins: REST, GraphQL, gRPC And SOAP — Modern API Architecture: REST, GraphQL & gRPC
- Type-Safe Client Generation: Orval & Automated SDKs — Production Full-Stack Engineering
- Type-Safe RPC Architectures: tRPC & Procedures — Production Full-Stack Engineering
- The Spine Artifact: Generating Typed Models From OpenAPI — Production TypeScript