Skip to main content
Exports the contract as an OpenAPI 3.0 specification (default) or a Postman Collection v2.1.

Usage

Options

string
default:"./openapi.json"
Output file path.
string
default:"openapi"
Output format. One of openapi or postman.
boolean
Shorthand for --format postman.

Postman collection contents

When exporting as Postman, the generated collection includes:
  • One request per contract endpoint.
  • Pre-generated example request bodies with realistic values (via Faker).
  • Test scripts that assert:
    • Response status code is in the 2xx range.
    • If a response schema is defined, each field exists and has the expected type.

Examples

Pair with bazable import to round-trip contracts to and from OpenAPI, or feed the Postman collection into bazable test --newman and Postman Integration.