← Prompt Library

Spec-first API design

OpenAPI before implementation, with an explicit human approval gate.

IntermediateCOMMUNITY ANALYSISOpenAPIREST
Design a REST API for {domain}.
Phase 1: produce an OpenAPI 3.1 specification only — resources, methods, status codes, error schema, pagination, filtering and auth. Then stop and wait for approval.
Phase 2 (only after I approve): generate handlers, request validation and contract tests that match the spec exactly.

Use Case

A new internal API with several consuming teams.

Expected Result

An OpenAPI 3.1 document approved before any handler exists.