Skip to content

Installation

This project supports two primary entry points:

  • CLI: openapi-testgen
  • Gradle plugin: art.galushko.openapi-test-generator

Requirements

Runtime

  • Java 21 or later (required for JVM CLI distribution and Gradle plugin)
  • Native binaries have no runtime requirements

Supported specifications

  • OpenAPI 3.0.x and 3.1.x

Building from source

  • Java 21
  • Kotlin 2.2.x

Version placeholders

This documentation uses placeholders like <version> in examples.

Where to find a version:

  • CLI releases: use the release tag / filename from GitHub Releases.
  • Gradle plugin: use the version shown in the Gradle Plugin Portal.
  • Maven dependencies: use the version published to Maven Central for the artifact you depend on (for example, distribution-bundle).

CLI

npm install -g @openapi-testgen/cli
openapi-testgen --help

The npm package uses a native binary when available and falls back to a Java 21+ JAR on unsupported platforms.

For pnpm/yarn/bun commands, project dependency setup, and troubleshooting, see npm Installation.

Download from GitHub

Download the latest release from the GitHub Releases page:

  • JVM distribution (openapi-testgen-<version>.zip): Fat JAR, cross-platform, requires Java 21+
  • Native binary (openapi-testgen-<version>-<platform>.zip): Standalone executable, no Java required
    • linux-amd64: Linux x86_64
    • linux-arm64: Linux arm_64
    • macos-arm64: macOS Apple Silicon
    • windows-amd64: Windows x86_64

JVM distribution

# Download and extract
unzip openapi-testgen-<version>.zip

# Run (requires Java 21+)
java -jar openapi-testgen-<version>-all.jar --help

Native binary

# Download and make executable (Linux/macOS)
unzip openapi-testgen-<version>-linux-amd64.zip
cd openapi-testgen-<version>-linux-amd64
chmod +x openapi-testgen
./openapi-testgen --help

Build from source

For development or custom builds:

# JVM distribution
./gradlew :cli:installDist
./cli/build/install/openapi-testgen/bin/openapi-testgen --help

# Native image (requires GraalVM)
./gradlew :cli:nativeCompile
./cli/build/native/nativeCompile/openapi-testgen --help

See the CLI reference for complete usage and options.

Gradle plugin

The plugin is published to the Gradle Plugin Portal.

Apply the plugin

Using the plugins DSL (recommended):

plugins {
    id("art.galushko.openapi-test-generator") version "<version>"
}

Or using legacy plugin application:

buildscript {
    repositories {
        gradlePluginPortal()
    }
    dependencies {
        classpath("art.galushko.openapi.testgen:plugin:<version>")
    }
}

apply(plugin = "art.galushko.openapi-test-generator")

Then configure openApiTestGenerator { ... }. See: Gradle integration and Gradle plugin reference.