swagger-api / swagger-api/swagger-codegen
[JAVA] Invalid java code is generated
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I'm trying to generate the API based on the fido2-server.yaml. The generated java code is invalid.
Due to the environment restriction I have to use swagger v2.0. Any idea's how to solve this?
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project fido2.swagger: Compilation failure: Compilation failure:
/c:/dev/prj/hanndecl/fido2-swagger/target/generated-sources/openapi-server/src/main/java/io/swagger/api/AssertionApi.java:[74,204] <identifier> expected
/c:/dev/prj/hanndecl/fido2-swagger/target/generated-sources/openapi-server/src/main/java/io/swagger/api/AttestationApi.java:[74,206] <identifier> expected
Swagger-codegen version
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.3.1</version>
Swagger declaration file content or url
Maven project: https://github.com/hanndecl/fido2-swagger
Command line used for generation
see https://github.com/hanndecl/fido2-swagger/pom.xml
Steps to reproduce
{code}
maven clean install
{code}
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.
Research direction
Start with the Maven configuration in the linked fido2-swagger project's pom.xml and run the reported maven clean install reproduction. Inspect the generated AssertionApi.java and AttestationApi.java files at the reported compiler locations. Done means the generated Java sources compile successfully under swagger-codegen 2.3.1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100