# 使用 Homebrew, pacman 安装 openapi-generator

查看 openapi-generator 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:openapi-generator
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install openapi-generator
```

  证据: local Homebrew formula metadata

### Linux

- pacman (92%):

```sh
sudo pacman -S openapi-generator
```

  证据: Arch Linux sync databases: openapi-generator from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:openapi-generator
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/openapi-generator>
- **版本:** 7.24.0
- **来源摘要:** Generate clients, server & docs from an OpenAPI spec (v2, v3)
- **主页:** <https://openapi-generator.tech/>
- **仓库:** <https://github.com/OpenAPITools/openapi-generator>
- **上游文档:** <https://openapi-generator.tech/>
- **许可证:** Apache-2.0
- **源码归档:** <https://search.maven.org/remotecontent?filepath=org/openapitools/openapi-generator-cli/7.24.0/openapi-generator-cli-7.24.0.jar>
- **最后更新:** 2026-07-20T09:49:26Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- openapi-generator (cli)
- openapi-generator (别名)

## 依赖

- openjdk

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 7.24.0
- 管理器更新时间: 2026-07-20
- 本地数据: OK
- 上游仓库: https://openapi-generator.tech/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

OpenAPI Generator is a large OpenAPITools project that generates API clients, server stubs, documentation, schemas, configuration, and related artifacts from OpenAPI specifications. The Homebrew package installs the `openapi-generator` CLI.

### 项目历史

The repository was created on May 12, 2018 as a fork of Swagger Codegen. The project history in the README says more than 40 Swagger Codegen contributors and template creators forked the project because of disagreement around the Swagger Codegen 3.0.0 beta and project direction, choosing to maintain a community-driven generator under the OpenAPI Generator name.

The migration guide describes OpenAPI Generator as a fork of `swagger-codegen` between versions 2.3.1 and 2.4.0 and documents practical migration changes: new Maven coordinates, Docker images, generator names, parameter names, template-variable changes, and `.openapi-generator-ignore` replacing `.swagger-codegen-ignore`.

### 采用历史

OpenAPI Generator became one of the central tools in the OpenAPI ecosystem because it covers many generated targets rather than one language. Its README lists client generators, server stubs, documentation generators, schema generators, and auxiliary outputs such as Postman collections, Protocol Buffers, GraphQL schemas, and database schemas.

Distribution grew around the different places API generation happens: Maven Central artifacts for Java builds, Maven and Gradle plugins, Docker images, an npm CLI wrapper, pip packaging, direct JAR downloads, launcher scripts, Homebrew, and other package managers. The project also has a sponsorship and backer structure, reflecting its role as shared infrastructure for many companies and API teams.

### 使用方式

The common workflow is to run `openapi-generator generate` with an input OpenAPI document and a selected generator name. Teams use it to produce SDKs, server skeletons, docs, tests, schemas, and config from a spec that can be versioned with the API.

The CLI also includes discovery and support commands such as `list`, `config-help`, `author`, and `batch`. Build integrations let organizations generate code during Maven, Gradle, Docker, npm, or CI jobs instead of treating generated clients as hand-maintained source.

### 为什么软件包爱好者会关心

OpenAPI Generator is a package-manager stress test: one upstream project surfaces as a Java artifact, CLI JAR, Docker image, npm package, pip package, Homebrew formula, plugins, and generated packages in many target languages. It is a single tool whose output often becomes many other packages.

Its fork history also matters. The project represents the OpenAPI ecosystem's shift from Swagger-branded tooling toward community-governed OpenAPI tooling after the OpenAPI Initiative standardized the former Swagger specification.

### 时间线

- 2010: the OpenAPI Specification's lineage began with Swagger. November 5, 2015: the OpenAPI Initiative was announced under the Linux Foundation with SmartBear donating the Swagger specification. May 12, 2018: OpenAPI Generator's repository was created as a Swagger Codegen fork. June 8, 2026: GitHub releases list v7.23.0.

### Related projects

- OpenAPI Generator is directly related to Swagger Codegen, the OpenAPI Specification, OpenAPITools, Maven and Gradle plugins, Docker images, npm and pip CLI wrappers, and other OpenAPI code generators.

### 来源

- <https://api.github.com/repos/OpenAPITools/openapi-generator>
- <https://formulae.brew.sh/formula/openapi-generator>
- <https://github.com/OpenAPITools/openapi-generator>
- <https://openapi-generator.tech/docs/generators/>
- <https://openapi-generator.tech/docs/swagger-codegen-migration/>
- <https://openapi-generator.tech/docs/usage>
- <https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/README.md>
- <https://www.linuxfoundation.org/press/press-release/new-collaborative-project-to-extend-swagger-specification-for-building-connected-applications-and-services>
- <https://www.openapis.org/style-guide>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** openapi-generator
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- pacman - openapi-generator - 7.24.0-1: normalized package name match | Arch Linux sync databases: openapi-generator from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Generation of API client libraries, server stubs, documentation and configuration | https://github.com/openapitools/openapi-generator/


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [openjdk](https://pkg.so/zh-hans/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [openapi-diff](https://pkg.so/zh-hans/brew/openapi-diff/) - Shares pkgdb curated category or tags: api-development, cli, developer-tools, openapi.
- [openapi-tui](https://pkg.so/zh-hans/brew/openapi-tui/) - Shares pkgdb curated category or tags: api-development, cli, developer-tools, openapi.
- [create-api](https://pkg.so/zh-hans/brew/create-api/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools, openapi.
- [sourcery](https://pkg.so/zh-hans/brew/sourcery/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools.
- [mockolo](https://pkg.so/zh-hans/brew/mockolo/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools.
- [mockery](https://pkg.so/zh-hans/brew/mockery/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools.
- [rswift](https://pkg.so/zh-hans/brew/rswift/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools.
- [protoc-gen-go-grpc](https://pkg.so/zh-hans/brew/protoc-gen-go-grpc/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools.
- [swagger-codegen](https://pkg.so/zh-hans/brew/swagger-codegen/) - Local package facts share a topical domain. Shared terms: api, cli, clients, code, code-generation.

## Combined YAML source

View the package source record on GitHub. [combined/openapi-generator.yml](https://github.com/mxcl/pkgdb/blob/main/combined/openapi-generator.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
