Navigation and completion

Move between OpenAPI operations and their Spring, NestJS, Express, or AWS Lambda implementations, and complete contract paths in Spring mapping annotations.

Documentation pages

CodeLens

Above each mapped endpoint, a CodeLens names the operation it implements (“OpenAPI: GET /patients/{patientId}”); click it to open the operation. Above each operation in the contract, a CodeLens names its implementation (“Implementation: PatientController.kt”), or shows how many there are and lists them. A CodeLens appears only where both sides exist; drift is reported by the diagnostics. Turn them off with stackblender.openApiGuard.codeLens.

Go to Definition

F12, Ctrl+click, and Cmd+click work both ways: from a mapping annotation, an Express route, or a Lambda route registration to its operation, and from an operation to every implementation. The commands OpenAPI Guard: Go to OpenAPI Operation and OpenAPI Guard: Go to Implementation do the same from the editor context menu.

Path completion

Inside the string of a Spring mapping annotation (@GetMapping("…"), @RequestMapping("…"), and the others), completion offers the contract’s paths:

  • On a handler, the operations for that annotation’s HTTP method, relative to the controller’s class-level path. Operations that nothing implements yet come first, marked not implemented.
  • On a class-level @RequestMapping, each resource path, up to its first path variable.
Completion inside @GetMapping in a patients controller lists /{patientId}/appointments first, marked not implemented, then /{patientId}.
Path completion offers the contract's paths, unimplemented operations first.
CodeLens links above each operation in the OpenAPI YAML name the implementing controller, such as Implementation: PatientController.kt.
CodeLens links each operation to its implementation, and back.