1.1.02003.1 MB
MIT
strict
core24
Generate .http files from OpenAPI specifications
HTTP File Generator generates .http files from OpenAPI specifications.
.http files were made popular by the Visual Studio Code extension REST
Client, which then was adopted by JetBrains IDEs, and later on Visual
Studio 2022.
The CLI accepts a URL or input file for an OpenAPI specification and writes
ready-to-run .http files to disk. It can generate one request per file, one
file per tag, or a single combined file. Generated requests can include
content type variables, path parameter variables, request summaries,
descriptions, sample payloads, and custom headers.
.http files were made popular by the Visual Studio Code extension REST
Client, which then was adopted by JetBrains IDEs, and later on Visual
Studio 2022.
The CLI accepts a URL or input file for an OpenAPI specification and writes
ready-to-run .http files to disk. It can generate one request per file, one
file per tag, or a single combined file. Generated requests can include
content type variables, path parameter variables, request summaries,
descriptions, sample payloads, and custom headers.
Generate .http files from OpenAPI specifications Usage: httpgenerator [URL or input file] [OPTIONS]
Arguments:
[URL or input file] URL or file path to OpenAPI Specification file
Options:
-o, --output <OUTPUT>
Output directory [default: ./]
--no-logging
Don't log errors or collect telemetry
--skip-validation
Skip validation of OpenAPI Specification file
--authorization-header <HEADER>
Authorization header to use for all requests
--load-authorization-header-from-environment
Load the authorization header from an environment variable or define it in the .http file. You can use --authorization-header-variable-name to specify the environment variable name.
--authorization-header-variable-name <VARIABLE-NAME>
Name of the environment variable to load the authorization header from [default: authorization]
--content-type <CONTENT-TYPE>
Default Content-Type header to use for all requests [default: application/json]
--base-url <BASE-URL>
Default Base URL to use for all requests. Use this if the OpenAPI spec doesn't explicitly specify a server URL.
--output-type <OUTPUT-TYPE>
OneRequestPerFile generates one .http file per request. OneFile generates a single .http file for all requests. OneFilePerTag generates one .http file per first tag associated with each request. [default: OneRequestPerFile] [possible values: OneRequestPerFile, OneFile, OneFilePerTag]
--azure-scope <SCOPE>
Azure Entra ID Scope to use for retrieving Access Token for Authorization header
--azure-tenant-id <TENANT-ID>
Azure Entra ID Tenant ID to use for retrieving Access Token for Authorization header
--timeout <SECONDS>
Timeout (in seconds) for writing files to disk [default: 120]
--generate-intellij-tests
Generate IntelliJ tests that assert whether the response status code is 200
--custom-header <HEADER>
Add custom HTTP headers to the generated request
--skip-headers
Don't generate header parameters in the files
-h, --help
Print help information
-v, --version
Print version information
Examples:
httpgenerator ./openapi.json
httpgenerator ./openapi.json --output ./
httpgenerator ./openapi.json --output-type onefile
httpgenerator https://petstore.swagger.io/v2/swagger.json
httpgenerator https://petstore3.swagger.io/api/v3/openapi.json --base-url https://petstore3.swagger.io
httpgenerator ./openapi.json --authorization-header Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9c
httpgenerator ./openapi.json --azure-scope [Some Application ID URI]/.default
httpgenerator ./openapi.json --generate-intellij-tests
httpgenerator ./openapi.json --custom-header X-Custom-Header: Value --custom-header X-Another-Header: AnotherValueUpdate History
1.1.0 199 → 20030 May 2026, 11:15 UTC
1.1.0 193 → 19928 May 2026, 09:30 UTC
1.1.0 188 → 19320 May 2026, 07:00 UTC
1.1.0 181 → 18818 May 2026, 14:30 UTC
1.1.0 175 → 18118 May 2026, 00:45 UTC
1.1.0 170 → 17517 May 2026, 13:45 UTC
1.1.0 164 → 17017 May 2026, 00:00 UTC
1.1.0 160 → 16416 May 2026, 22:00 UTC
1.1.0 157 → 16014 May 2026, 20:15 UTC
1.1.0 148 → 15714 May 2026, 12:15 UTC
1.1.0 147 → 14814 May 2026, 08:00 UTC
1.1.0 141 → 14713 May 2026, 16:45 UTC
1.1.0 136 → 14112 May 2026, 15:00 UTC
1.1.0 126 → 13612 May 2026, 09:30 UTC
1.1.0 121 → 12612 May 2026, 09:15 UTC
1.1.0 116 → 12112 May 2026, 07:45 UTC
1.1.0 100 → 11612 May 2026, 07:00 UTC
1.1.0 94 → 10011 May 2026, 22:45 UTC
1.1.0 88 → 9411 May 2026, 12:15 UTC
0.1.0 (77) → 1.1.0 (88)11 May 2026, 12:00 UTC
4 May 2026, 21:17 UTC
30 May 2026, 10:57 UTC
4 May 2026, 21:45 UTC