OpenAPITools / OpenAPITools/openapi-generator
[BUG][CLIENT][Java-VertX]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- What's the version of OpenAPI Generator used?
Latest master (4.2.0-SNAPSHOT) - Have you search for related issues/PRs?
- What's the actual output vs expected output?
CircleCi:
[ERROR] COMPILATION ERROR :
[ERROR] /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeApiTest.java:[316,22] variable context is already defined in method testQueryParameterCollectionFormatTest(io.vertx.ext.unit.TestContext)
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile (default-testCompile) on project petstore-vertx: Compilation failure
[ERROR] /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeApiTest.java:[316,22] variable context is already defined in method testQueryParameterCollectionFormatTest(io.vertx.ext.unit.TestContext)
Description
Vertx was builded against the latest generator but is not overriding files on generation thus the test files are really old. If the java-petstore-vertx directory is deleted before regeneration the generated code will no longer compile resulting in a failed test.
- Reference Build: https://circleci.com/gh/OpenAPITools/openapi-generator/9319?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
- Pull Request which failed 'cause of this: https://github.com/OpenAPITools/openapi-generator/pull/4030
- Console output snippet on regeneration:
[main] INFO o.o.codegen.DefaultGenerator - File exists. Skipped overwriting /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeApiTest.java
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/docs/FakeApi.md
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeClassnameTags123Api.java
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java
[main] INFO o.o.codegen.DefaultGenerator - File exists. Skipped overwriting /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java
[main] INFO o.o.codegen.DefaultGenerator - File exists. Skipped overwriting /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/PetApiTest.java
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/docs/PetApi.md
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApi.java
[main] INFO o.o.codegen.AbstractGenerator - writing file /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java
[main] INFO o.o.codegen.DefaultGenerator - File exists. Skipped overwriting /home/rtiersch/workspace/cloned/openapi-generator/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/StoreApiTest.java
Suggest a fix
Fix tests or remove tests / golden files to no longer test this generator in CircleCI
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 samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeApiTest.java, especially testQueryParameterCollectionFormatTest, and review the reported regeneration output showing skipped test files. Reproduce the Java Vert.x sample generation and Maven test compilation; done means regeneration no longer leaves the conflicting test state and the sample compiles successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100