untyped-api-response
API endpoint has no typed response — consumers can't rely on the response shape.
Applies to: JavaScript, Python, TypeScript
Why this matters
Untyped API responses prevent TypeScript/OpenAPI code generation, break IDE autocompletion for consumers, and let the response shape drift silently. Add response_model (FastAPI), res.json<Type>() (Express), or NextResponse.json<Type>() (Next.js) to every endpoint.
Catch it before it ships
pip install stablestack # or: npx stablestackstablestack # scans your project, API007 includedstablestack explain API007False positive in your codebase? Suppress a single line with # noqa: API007
More API Contracts checks
unhandled-api-error
API calls without error handling will crash on network failures
API002inconsistent-api-naming
Mixed naming conventions (snake_case/camelCase) in API code cause bugs
API003missing-content-type
POST/PUT requests without Content-Type may fail or be misinterpreted
API004hardcoded-api-url
Hardcoded API URLs make it hard to switch between environments
API005api-type-alignment
Backend endpoints should have response_model; frontend should use generated types.
API006cross-file-type-mismatch
Cross-file type mismatch between API endpoint and client call site.