12 Star 45 Fork 14

Gitee 极速下载/OpenAPI-Generator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/OpenAPITools/openapi-generator
克隆/下载
faq-extending.md 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
idtitle
faq-extendingFAQ: Extending

How do I use my own Java models?

See Bringing your own Models.

How do I disable certificate verification?

Please add -Dio.swagger.v3.parser.util.RemoteUrl.trustAll=true when generating the code.

How do I skip files during code generation?

OpenAPI Generator has a built-in ignore file processor.

For example, to skip git_push.sh, one can create a file named .openapi-generator-ignore in the root of the output directory with the contents:

# Prevent generator from creating these files:
git_push.sh

The ignore file works just like .gitignore, and it is auto-generated by default.

If you need this functionality on initial generation, you can provide the option --ignore-file-override (CLI) or ignoreFileOverride (Maven and Gradle plugins) with a value targeting any existing file. The contents of that file will be evaluated relative to the output directory.

How can I customize the auto-generated code?

Variants:

  • "How can I add a header/footer to generated code?"
  • "How can I add my own logging to generated code?"
  • "How can I add my license to the top of files?"

OpenAPI Generator supports user-defined templates without need to recompile the artifact. We also support custom generators (templates and logic) if those generators are accessible on the classpath.

See templating: Modifying Templates and customization docs for more details.

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/OpenAPI-Generator.git
git@gitee.com:mirrors/OpenAPI-Generator.git
mirrors
OpenAPI-Generator
OpenAPI-Generator
master

搜索帮助