Muitilile error during generation openapi client from swagger
还没有人认领这个 Issue。
评估
调研方向
解压 test-github-api.zip,进入 test-github-api 目录并运行 mvn clean install,以复现生成客户端的编译错误。检查生成的 RepositoryCreatedAt.java、RepositoryPushedAt.java、JSON.java 和 budget 模型文件,以及生成它们的 OpenAPI schema。报告的生成 Java 源文件能够在没有缺少方法和 ContentDirectory 类错误的情况下编译,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hi
I am generating client using openapi toolkit base on your swagger schema. I and during compilation getting multiple errors
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project test-github-api: Compilation failure: Compilation failure:
[ERROR] /Users/arseniy/MyPrj/git/test-github-api/target/generated-sources/openapi/src/gen/java/main/api/github/com/generated/model/RepositoryCreatedAt.java:[118,39] cannot find symbol
[ERROR] symbol: method validateJsonElement(com.google.gson.JsonElement)
[ERROR] location: class java.time.OffsetDateTime
[ERROR] /Users/arseniy/MyPrj/git/test-github-api/target/generated-sources/openapi/src/gen/java/main/api/github/com/generated/model/RepositoryCreatedAt.java:[242,27] cannot find symbol
[ERROR] symbol: method validateJsonElement(com.google.gson.JsonElement)
[ERROR] location: class java.time.OffsetDateTime
[ERROR] /Users/arseniy/MyPrj/git/test-github-api/target/generated-sources/openapi/src/gen/java/main/api/github/com/generated/model/RepositoryPushedAt.java:[118,39] cannot find symbol
[ERROR] symbol: method validateJsonElement(com.google.gson.JsonElement)
[ERROR] location: class java.time.OffsetDateTime
[ERROR] /Users/arseniy/MyPrj/git/test-github-api/target/generated-sources/openapi/src/gen/java/main/api/github/com/generated/model/RepositoryPushedAt.java:[247,27] cannot find symbol
[ERROR] symbol: method validateJsonElement(com.google.gson.JsonElement)
[ERROR] location: class java.time.OffsetDateTime
[ERROR] /Users/arseniy/MyPrj/git/test-github-api/target/generated-sources/openapi/src/gen/java/main/api/github/com/generated/JSON.java:[79,94] cannot find symbol
[ERROR] symbol: class ContentDirectory
[ERROR] location: package api.github.com.generated.model
[ERROR] /Users/arseniy/MyPrj/git/test-github-api/target/generated-sources/openapi/src/gen/java/main/api/github/com/generated/model/BillingUpdateBudgetOrg200ResponseBudget.java:[461,15] cannot find symbol
[ERROR] symbol: method validateJsonElement(com.google.gson.JsonElement)
[ERROR] location: class java.lang.String
[ERROR] /Users/arseniy/MyPrj/git/test-github-api/target/generated-sources/openapi/src/gen/java/main/api/github/com/generated/model/Budget.java:[397,13] cannot find symbol
[ERROR] symbol: method validateJsonElement(com.google.gson.JsonElement)
[ERROR] location: class java.lang.String
[ERROR] /Users/arseniy/MyPrj/git/test-github-api/target/generated-sources/openapi/src/gen/java/main/api/github/com/generated/model/GetBudget.java:[464,13] cannot find symbol
[ERROR] symbol: method validateJsonElement(com.google.gson.JsonElement)
[ERROR] location: class java.lang.String
[ERROR] /Users/arseniy/MyPrj/git/test-github-api/target/generated-sources/openapi/src/gen/java/main/api/github/com/generated/model/BillingUpdateBudgetOrgRequest.java:[432,15] cannot find symbol
[ERROR] symbol: method validateJsonElement(com.google.gson.JsonElement)
[ERROR] location: class java.lang.String
[ERROR] -> [Help 1]
How to reproduce:
- open zip file test-github-api.zip
- cd test-github-api
- mvn clean install
Thanks
Arseniy Isakov
- 主要语言
- 没有语言数据
- 星标
- 1.6k
- 派生
- 342
- 平均合并
- 3 小时 33 分钟
- 30 天内合并 PR
- 51
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/rest-api-description 的其他 Issue
-
feature
难度 2/5 1-3 小时 新手友好度 82/100
github/rest-api-description#7201 ·
-
feature
难度 2/5 1-3 小时 新手友好度 72/100
github/rest-api-description#7163 ·
-
feature
难度 2/5 1-3 小时 新手友好度 68/100
github/rest-api-description#7162 ·
-
feature
难度 2/5 1-3 小时 新手友好度 68/100
github/rest-api-description#7135 ·
-
feature
难度 2/5 1-3 小时 新手友好度 74/100
github/rest-api-description#7111 · 1 条评论 ·
查看 github/rest-api-description 的全部 Issue
相似的 Issue
-
area/sessions comp/cron comp/gateway P2 sweeper:risk-message-delivery sweeper:risk-session-state type/bug
难度 2/5 1-3 小时 新手友好度 78/100
NousResearch/hermes-agent#118863 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 78/100
use-agent-os/agent-os#3312 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
-
needs-acceptance wg/data-plane-networking
难度 2/5 1-3 小时 新手友好度 78/100
vllm-project/semantic-router#4024 · 1 条评论 ·