Skip to content

OpenAPI sync

OpenAPI sync shows what changed between an API spec and your requests, so your requests keep up with the API.

Right-click a folder → Compare with OpenAPI…, or use the command palette. Pick an OpenAPI 3 or Swagger 2.0 file.

Courier lists:

  • operations that are new in the spec,
  • requests the spec no longer describes,
  • matched requests whose required query parameters, headers or body differ.

Matching is by method and path shape, so /pets/{petId}, /pets/{{id}} and /pets/7 are the same. The server’s base path is ignored.

Click Add N requests to import just the new operations. Existing files are never changed, and nothing is deleted.

Terminal window
courier sync openapi.yaml api-checks --env staging # exit 1 when they differ
courier sync openapi.yaml api-checks --add # also add the new operations

--env picks the environment whose values fill {{variables}} in request URLs.