OpenAPI Guard for VS Code
Keep an OpenAPI 3.x contract and its Spring Boot, NestJS, Express, or AWS Lambda implementation in sync, with local analysis in VS Code.
Documentation pages
OpenAPI Guard compares an OpenAPI 3.x contract with the endpoints your code serves and reports where they disagree, as you edit. Everything runs locally: no source, specification, or result ever leaves your machine. These pages describe version 0.4.1.
What it finds
- Missing implementations: an operation in the contract that no controller serves.
- Undocumented endpoints: a controller endpoint the contract does not describe.
- HTTP method mismatches: the same path with a different method on each side.
Issues appear in the editor and the Problems panel, on the code and on the contract.
What it helps you do
- Fix drift in one step with quick fixes: add an endpoint to a YAML contract, implement a missing operation, or align a method on either side. See Diagnostics and quick fixes.
- See the whole contract in the Operations view, with a coverage summary you can copy into a pull request. See Operations view.
- Move between contract and code with CodeLens, Go to Definition, and path completion in mapping annotations. See Navigation and completion.
- Check from the terminal, CI, or an AI agent with the bundled CLI, MCP server,
and
#checkOpenApiContracttool. See CLI and agents.
What it supports
- Spring Boot controllers in Java and Kotlin, including mappings inherited from
API interfaces and base classes (the openapi-generator interface and delegate
patterns), constants, and
${...}placeholders. See Spring, NestJS, Express, and AWS Lambda support. - NestJS controllers in TypeScript.
- Express applications and routers in TypeScript or JavaScript, composed across files.
- AWS Lambda handlers behind API Gateway that dispatch on
event.routeKeythrough route maps orswitchstatements, including alias maps for legacy routes. - Several specifications in one workspace, found by their content and scoped to the modules they describe. See Specifications.
Start with the Quick start.