Muitilile error during generation openapi client from swagger

Open
#6,455 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java, openapi
Domain
api

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

feature

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:

  1. open zip file test-github-api.zip
  2. cd test-github-api
  3. mvn clean install

Thanks
Arseniy Isakov

test-github-api.zip

Dominant language
No language data
Stars
1.6k
Forks
342
Avg merge
3h 33m
Merged PRs (30d)
51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/rest-api-description

All issues in github/rest-api-description

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.