Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

OpenAPI Generator CLI

$ openapi-generator-cli Foundation Low Risk
OpenAPITools · Design & Docs · Apache-2.0 · macos / linux / windows

OpenAPI Generator CLI (@openapitools/openapi-generator-cli) wraps the Java OpenAPI Generator JAR to validate OpenAPI 2.0/3.x specs and generate SDKs, server stubs, or HTML/Markdown API documentation across dozens of languages. Deterministic config files (openapitools.json) aid repeatability, though the JVM + npm wrapper startup is heavy.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
brew install openapi-generator
CLI vs MCP Decision CLI Only

openapi-generator-cli runs deterministic local codegen over repository OpenAPI files and writes generated SDKs directly to disk.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Supports validate, --dry-run, openapitools.json pinning, and non-interactive -i/-g/-o flags, though stdout is verbose Java logging.

  • validate and --dry-run flags prevent unwanted file writes
  • Deterministic openapitools.json config
Trust & Safety 22 / 25

Offline spec validation and isolated -o output directory keep risks low (note first run may fetch JAR from Maven Central if uncached).

  • Supports --dry-run preview mode
  • .openapi-generator-ignore protects hand-edited files
Setup & Portability 11 / 15

Requires both Node.js (for @openapitools/openapi-generator-cli wrapper) and a Java Runtime Environment (JRE) to execute the JAR.

  • Dual Node.js + Java runtime requirement (or Docker image)
Utility & Efficiency 13 / 15

Unmatched breadth of 50+ target SDK languages and documentation generators from a single OpenAPI spec.

  • Generates TypeScript, Python, Go, Rust, Java, and HTML/Markdown docs
Maintenance & Lineage 8 / 10

OpenAPITools Foundation project (OpenAPITools/openapi-generator-cli) under Apache-2.0.

  • Broad multi-company open-source governance
Docs & Verifiability 6 / 10

Extensive docs on openapi-generator.tech, though generator-specific --additional-properties vary widely.

  • Official docs at openapi-generator.tech/docs/usage/

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No credentials required for local spec validation/generation; downloads generator JARs over HTTPS on first run unless cached.

Side Effects
Read-Only Local Write
Cost & Quotas

Free open-source software (Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# OpenAPI Generator CLI Agent Rules
- Run `openapi-generator-cli validate -i <spec>` before generating any SDK or docs.
- Test generation with `--dry-run` or write into a clean `-o` subdirectory rather than mixing with hand-written code.
- Pin generator version in `openapitools.json` to avoid unexpected JAR downloads.

Agent-Ready Command Recipes

Safe Read-Only Queries

Validate an OpenAPI specification
openapi-generator-cli validate -i openapi.yaml

Validates OpenAPI 2.0/3.x syntax and schema references without generating files.

List supported client and doc generators
openapi-generator-cli list

Enumerates all supported client, server, schema, and documentation generator names.

Controlled Writes & Previews

Dry-run TypeScript client generation
openapi-generator-cli generate -i openapi.yaml -g typescript-fetch -o ./generated-sdk --dry-run

Previews which SDK files would be generated without writing changes to ./generated-sdk.

Strengths for Agents

  • + Supports validate and --dry-run before writing generated SDK files.
  • + Covers 50+ client, server, schema, and documentation targets from one OpenAPI file.
  • + Pinning versions via openapitools.json keeps team and agent codegen reproducible.

Caveats & Pitfalls

  • ! Requires Java (JRE) in addition to Node.js when using the npm CLI wrapper, plus Maven JAR downloads on first run.
  • ! Verbose JVM stdout and inconsistent --additional-properties across language generators.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI