Idea · Aug 26, 2026

Type-Safe API Contract Lab

Students design a REST API in OpenAPI 3.1, generate a TypeScript server via codegen, write a Python client with Pydantic runtime validation, and build a Hypothesis fuzz test suite, learning contract-first development in an era where AI can write implementation but not specifications.

What it would do

Over three weeks students build a complete API ecosystem for a domain they choose from a provided list (game leaderboard, library catalog, recipe box, mood tracker). Week 1: they author an OpenAPI 3.1 spec in a provided YAML editor with live Swagger UI preview. A CI GitHub Actions job rejects specs that have missing operationIds, no request/response examples, or undocumented 4xx error codes. The spec is frozen at end of Week 1 and cannot be changed for the rest of the lab. Week 2: they run openapi-generator-cli to scaffold a TypeScript Express server, fill in handler logic (AI tools allowed but the frozen spec is the contract), and write Jest integration tests that validate all responses against the spec's JSON Schema. Week 3: they author a Python client using httpx and Pydantic models generated from the same spec, then write a Hypothesis-based fuzz test suite that must find at least one spec violation in their own server (a property-based test that sends random valid inputs and asserts the response matches the spec). A required design document of at least 800 words explains the rationale for every 4xx status code and every edge case their spec explicitly covers. The final deliverable is a GitHub repository with the spec, server, client, fuzz tests, and design doc, all passing in CI.

Key features

  • Week 1: OpenAPI 3.1 spec authoring with live Swagger UI preview and CI linter enforcing completeness
  • Spec freeze at end of Week 1: no modifications after this checkpoint
  • Week 2: TypeScript Express server scaffolded from spec via openapi-generator-cli; Jest integration tests validating responses against spec
  • Week 3: Python httpx + Pydantic client generated from same spec; Hypothesis fuzz test suite that must surface at least one spec violation
  • Required design document explaining all 4xx codes and edge case decisions
  • GitHub Actions CI enforcing spec linting, test passing, and doc word count

More in Developer Tooling

Stack Trace Theater

A browser tool that animates Python and Java stack traces as frame-by-frame call stack walkthroughs, with LLM-generated plain-English explanations at each level so novices understand not just what failed but why.

Developer ToolingTeaching toolMediumAug 30, 2026

Bug Witness Investigation

An interrogation-style debugging game where CS students question AI witness characters to deduce a bug's root cause, building systematic diagnostic thinking through narrative gameplay.

Developer ToolingTeaching toolMediumAug 29, 2026

Whiteboard-to-Code Studio

Students photograph or upload hand-drawn flowcharts, pseudocode, or UML sketches; a Gemini vision model converts them into runnable Python or Java function stubs with docstrings; a second pass flags potential logic gaps and emits structured design feedback before any implementation begins.

Developer ToolingClass assignmentLargeAug 27, 2026

Test Oracle Trainer

A classroom tool where instructors upload a program with hidden injected bugs and students write tests to find them, earning Claude-powered Socratic hints for bugs they haven't caught yet.

Developer ToolingTeaching toolMediumAug 24, 2026

All 131 ideas in Developer Tooling →