Specifications

How OpenAPI Guard finds OpenAPI contracts in a workspace, analyzes several at once, and how to choose them yourself.

Documentation pages

How contracts are found

Any YAML or JSON file that declares openapi: 3.x at its top is a contract, whatever its name. OpenAPI Guard skips test sources (src/test/), dependency caches (node_modules, .gradle), and build output (build, target, dist, out), so copies made by a build are never mistaken for the source contract.

Swagger 2.0 documents are not analyzed; OpenAPI Guard marks them in the Problems panel so the silence is explained. Convert them to OpenAPI 3.x to check them.

Several contracts

Every contract found is analyzed. In a multi-module Maven, Gradle, or npm workspace, each contract covers its own module and the modules that depend on it, read from pom.xml, Gradle build files, and package.json. An endpoint documented by any contract that covers it is never reported as undocumented. A contract in a module without controllers covers the whole workspace.

Choosing contracts

Run OpenAPI Guard: Select OpenAPI Specification and tick the contracts to analyze; the choice is saved in stackblender.openApiGuard.specs for that folder. Accept with nothing ticked to go back to automatic discovery.

When a configured file does not exist, or a contract cannot be parsed, OpenAPI Guard says so in a notification and in the Problems panel, and still analyzes the others.