-
Notifications
You must be signed in to change notification settings - Fork 0
Import
Convert OpenAPI, Swagger, or Postman specs into .http files.
:PosteImportOpenAPI- Select an OpenAPI 3.x spec file (JSON or YAML)
- Select an output directory
-
.httpfiles are generated with all endpoints, parameters, and schemas
:PosteImportSwaggerSame flow as OpenAPI import. Converts Swagger 2.0 to .http format.
:PosteImportPostmanConverts Postman Collection v2.1 JSON to .http files.
Imported specs generate .http files with:
-
@base_urldefinition at the top -
@vardefinitions for query, path, cookie, and form body parameters - Named request blocks for each endpoint
- Default values from the schema where available
Reference and execute requests across files.
Make request names from another file available:
import ./shared-vars.httpWith alias (namespace isolation):
import ./auth.http as authExecute a request from another file:
run #LoginRun with alias:
run #auth.GetTokenRun with variable overrides:
run #Login (@env=staging, @timeout=30)Run all requests in a file:
run ./setup.httpRun all with overrides:
run ./setup.http (@env=production)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.
Imported files can themselves import other files. The resolution is recursive.
Target blocks with pre/post scripts are executed normally when run via run directive. client.global variables persist across the entire chain.