HTTP File Generator (httpgenerator) Package name

Install latest/stable of HTTP File Generator

Ubuntu 16.04 or later?

Make sure snap support is enabled in your Desktop store.


Install using the command line

sudo snap install httpgenerator

Don't have snapd? Get set up for snaps.

Channel Version Published

Details for HTTP File Generator

Package name

  • httpgenerator

License

  • MIT

Last updated

  • Today - latest/stable
  • Today - latest/edge

Websites


Donations


Source code


Report a bug


Report a Snap Store violation

Share this snap

Generate an embeddable card to be shared on external websites.

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.

 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: AnotherValue

Install HTTP File Generator on your Linux distribution

Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the installing snapd documentation.


Where people are using HTTP File Generator