Muitilile error during generation openapi client from swagger
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Unpack test-github-api.zip, enter the test-github-api directory, and run mvn clean install to reproduce the generated-client compilation errors. Inspect the generated RepositoryCreatedAt.java, RepositoryPushedAt.java, JSON.java, and budget model files, along with the OpenAPI schema that produced them. Done means the reported generated Java sources compile without the missing methods and ContentDirectory class errors.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 51
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/rest-api-description#7111 · 1 comment ·
All issues in github/rest-api-description
Similar issues
-
area/sessions comp/cron comp/gateway P2 sweeper:risk-message-delivery sweeper:risk-session-state type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#118863 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3312 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·