OpenAPITools / OpenAPITools/openapi-generator

[BUG] SharedTypeScriptTest is creating artifacts in the source directory

Open
#8,286 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

When building java projects with maven, the convention is that you (the developer) should generate everything needed to run any tests after the {project}/target/... folder...
But in the SharedTypeScriptTest test class, it is being create in the source folder...
org.openapitools.codegen.typescript.SharedTypeScriptTest.typesInImportsAreSplittedTest()

That is not a good practice (for maven projects POV) and when a build is not succeed it could lead to wrongly adding those artifacts in the git repository (since it could be not deleted properly by the test).

Screenshot from 2020-12-28 18-55-20

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 modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java, especially typesInImportsAreSplittedTest(). Run that test to reproduce where generated artifacts are written. Done means the test artifacts are created under the Maven target area rather than the source directory, and the test still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
build-system, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.