OpenAPITools / OpenAPITools/openapi-generator

[BUG][CLIENT][Java-VertX]

Open
#4,074 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
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.

[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

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.