proomt

Search

Search posts, papers, and topics

All posts

SitePoint14 min readtutorialintermediate

How to Detect Breaking API Changes with TypeScript and OpenAPI

Summary

This tutorial outlines a CI pipeline using oasdiff and openapi-typescript to detect breaking API changes. It catches both spec-level modifications and frontend code mismatches against generated types, preventing silent contract drift and production bugs.

  • Commit a baseline OpenAPI spec to your main branch as the single source of truth.
  • Use oasdiff in CI to compare current and baseline specs, failing the build on breaking changes.
  • Generate TypeScript types from the OpenAPI spec using openapi-typescript.
  • Run tsc --noEmit against generated types to verify frontend code still compiles.

Frontend and backend teams should care to prevent production bugs caused by silent API contract changes, ensuring robust integration and reducing debugging time.

7/10

Related reading

  1. Eliminating AI Code Hallucinations with TypeScript Compiler Diagnostics and TDD Loops

    The article shows how to replace raw TypeScript compiler output with a programmatic JSON feedback loop that merges diagnostics and Vitest test failures, feeding the structured data back to an LLM coding agent for self‑correction. It provides concrete code for extracting, enriching, validating, and de‑duplicating errors, and demonstrates token savings and deterministic iteration until compilation…

    SitePointsitepoint.com15 min
  2. Optimizing GitHub Actions for Agent PRs: Speculative Test Slicing and AST Impact Analysis

    A step‑by‑step guide for handling the flood of pull requests generated by code‑generation agents. It builds a TypeScript CLI that uses ts‑morph to do AST‑level change‑impact analysis, maps affected symbols to tests, and runs only those tests in a “speculative” GitHub Actions job while a full‑suite verification runs in the background. The article includes concrete CLI code, dependency choices, con…

    SitePointsitepoint.com17 min
  3. Why client SDK generation belongs in the open

    Google partnered with Speakeasy to open‑source their OpenAPI‑based multi‑language SDK generator, covering Python, TypeScript, Go, Java, C#, PHP, and Ruby. The move replaces a now‑defunct proprietary generator, reduces maintenance overhead to ~1 engineer, and adds a CLI and documentation server generator under AGPLv3.

    Google Developersgoogleblog.com3 min
  4. TanStack Charts Introduced with a Framework Agnostic Grammar of Graphics for TypeScript

    TanStack Charts α is a framework‑agnostic, TypeScript‑first charting library that implements a grammar‑of‑graphics API (marks, scales, channels, transforms, layers). It ships as a single npm package with adapters for React, Preact, Vue, Solid, Svelte, Angular, Lit, and vanilla DOM, and can run on server or client. The runtime is headless; type inference stays tied to the source row, so each mark…

    InfoQinfoq.com2 minrelease