Skip to content
lex edited this page Jul 23, 2026 · 1 revision

Import & Cross-File Execution

Importing Specs

Convert OpenAPI, Swagger, or Postman specs into .http files.

OpenAPI 3.x

:PosteImportOpenAPI
  1. Select an OpenAPI 3.x spec file (JSON or YAML)
  2. Select an output directory
  3. .http files are generated with all endpoints, parameters, and schemas

Swagger 2.0

:PosteImportSwagger

Same flow as OpenAPI import. Converts Swagger 2.0 to .http format.

Postman Collection

:PosteImportPostman

Converts Postman Collection v2.1 JSON to .http files.

Generated Output

Imported specs generate .http files with:

  • @base_url definition at the top
  • @var definitions for query, path, cookie, and form body parameters
  • Named request blocks for each endpoint
  • Default values from the schema where available

Cross-File References (import / run)

Reference and execute requests across files.

Import

Make request names from another file available:

import ./shared-vars.http

With alias (namespace isolation):

import ./auth.http as auth

Run

Execute a request from another file:

run #Login

Run with alias:

run #auth.GetToken

Run with variable overrides:

run #Login (@env=staging, @timeout=30)

Run all requests in a file:

run ./setup.http

Run all with overrides:

run ./setup.http (@env=production)

Variable Overrides

Overrides in run take the highest priority in the resolution chain:

run #CreateUser (@role=admin, @department=engineering)

These override block-level, file-level, and env variables.

Nested Imports

Imported files can themselves import other files. The resolution is recursive.

Script Support

Target blocks with pre/post scripts are executed normally when run via run directive. client.global variables persist across the entire chain.

Clone this wiki locally