:
:
:
 is obtained from an untrusted source or environment, please make sure you've reviewed these inputs before using OpenAPI Generator to generate the API client, server stub or documentation to avoid potential security issues (e.g. code injection). For security vulnerabilities, please contact ***. :warning:
:bangbang: Both "OpenAPI Tools" ([***] - the parent organization of OpenAPI Generator) and "OpenAPI Generator" are not affiliated with OpenAPI Initiative (OAI) :bangbang:
If you find OpenAPI Generator useful for work, please *** asking your company to support this Open Source project by becoming a sponsor. You can also individually sponsor the project by becoming a backer.
Thank you to our bronze ***!
, server stubs, documentation and configuration automatically given an https://github.com/OAI/OpenAPI-Specification (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
| Languages/Frameworks | |
|---|---|
| API clients | ActionScript, Ada, Apex, Bash, C, C# (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0, .NET 5.0. Libraries: RestSharp, HttpClient), C++ (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), Clojure, Crystal, Dart, Elixir, Elm, Eiffel, Erlang, Go, Groovy, Haskell (http-client, Servant), Java (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), k6, Kotlin, Lua, Nim, Node.js/JavaScript (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), Objective-C, OCaml, Perl, PHP, PowerShell, Python, R, Ruby, Rust (hyper, reqwest, rust-server), Scala (akka, http4s, scalaz, sttp, swagger-async-httpclient), Swift (2.x, 3.x, 4.x, 5.x), Typescript (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
| Server stubs | Ada, C# (ASP.NET Core, NancyFx), C++ (Pistache, Restbed, Qt5 QHTTPEngine), Erlang, F# (Giraffe), Go (net/http, Gin, Echo), Haskell (Servant), Java (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, https://github.com/ProKarma-Inc/pkmst-getting-started-examples, Vert.x), Kotlin (Spring Boot, Ktor, Vertx), PHP (Laravel, Lumen, Slim, Silex, Symfony, https://github.com/zendframework/zend-expressive), Python (FastAPI, Flask), NodeJS, Ruby (Sinatra, Rails5), Rust (rust-server), Scala (Akka, https://github.com/finagle/finch, https://github.com/lagom/lagom, Play, Scalatra) |
| API documentation generators | HTML, Confluence Wiki, Asciidoc, Markdown, PlantUML |
| Configuration files | Apache2 |
| Others | GraphQL, JMeter, Ktorm, MySQL Schema, Protocol Buffer, WSDL |
The OpenAPI Specification has undergone 3 revisions since initial creation in 2010. The openapi-generator project has the following compatibilities with the OpenAPI Specification:
| OpenAPI Generator Version | Release Date | Notes |
|---|---|---|
| 6.0.0 (upcoming major release) SNAPSHOT | Nov/Dec 2021 | Minor release with breaking changes (no fallback) |
| 5.3.0 (upcoming minor release) SNAPSHOT | Aug/Sep 2021 | Minor release with breaking changes (with fallback) |
| 5.2.1 (upcoming patch release) SNAPSHOT | 09.08.2021 | Patch release (enhancements, bug fixes, etc) |
| https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.2.0 (latest stable release) | 09.07.2021 | Minor release with breaking changes (with fallback) |
| https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1 | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
For old releases, please refer to the https://github.com/OpenAPITools/openapi-generator/releases page.
You can find our released artifacts on maven central:
Core:
xml<dependency> <groupId>org.openapitools</groupId> <artifactId>openapi-generator</artifactId> <version>${openapi-generator-version}</version> </dependency>
See the different versions of the openapi-generator artifact available on maven central.
Cli:
xml<dependency> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-cli</artifactId> <version>${openapi-generator-version}</version> </dependency>
See the different versions of the openapi-generator-cli artifact available on maven central.
Maven plugin:
xml<dependency> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> <version>${openapi-generator-version}</version> </dependency>
Gradle plugin:
xml<dependency> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-gradle-plugin</artifactId> <version>${openapi-generator-version}</version> </dependency>
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
JAR location: https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar
For Mac/Linux users:
shwget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar -O openapi-generator-cli.jar
For Windows users, you will need to install wget or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar
After downloading the JAR, run java -jar openapi-generator-cli.jar help to show the usage.
For Mac users, please make sure Java 8 is installed (Tips: run java -version to check the version), and export JAVA_HOME in order to use the supported Java version:
shexport JAVA_HOME=`/usr/libexec/java_home -v 1.8` export PATH=${JAVA_HOME}/bin:$PATH
One downside to manual jar downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at bin/utils/openapi-generator.cli.sh which resolves this issue.
To install the launcher script, copy the contents of the script to a location on your path and make the script executable.
An example of setting this up (NOTE: Always evaluate scripts curled from external systems before executing them).
mkdir -p ~/bin/openapitools curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli chmod u+x ~/bin/openapitools/openapi-generator-cli export PATH=$PATH:~/bin/openapitools/
Now, openapi-generator-cli is "installed". On invocation, it will query the GitHub repository for the most recently released version. If this matches the last downloaded jar,
it will execute as normal. If a newer version is found, the script will download the latest release and execute it.
If you need to invoke an older version of the generator, you can define the variable OPENAPI_GENERATOR_VERSION either ad hoc or globally. You can export this variable if you'd like to persist a specific release version.
Examples:
# Execute latest released openapi-generator-cli openapi-generator-cli version # Execute version 3.1.0 for the current invocation, regardless of the latest released version OPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli version # Execute version 3.1.0-SNAPSHOT for the current invocation OPENAPI_GENERATOR_VERSION=3.1.0-SNAPSHOT openapi-generator-cli version # Execute version 3.0.2 for every invocation in the current shell session export OPENAPI_GENERATOR_VERSION=3.0.2 openapi-generator-cli version # is 3.0.2 openapi-generator-cli version # is also 3.0.2 # To "install" a specific version, set the variable in .bashrc/.bash_profile echo "export OPENAPI_GENERATOR_VERSION=3.0.2" >> ~/.bashrc source ~/.bashrc openapi-generator-cli version # is always 3.0.2, unless any of the above overrides are done ad hoc
To build from source, you need the following installed and available in your $PATH:
Java 8
Apache Maven 3.3.4 or greater
After cloning the project, you can build it from source with this command:
shmvn clean install
If you don't have maven installed, you may directly use the included [maven wrapper](https://github.com/takari/mave
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
不支持 push
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务