swagger-api / swagger-api/swagger-codegen

Swagger Codegen Version Build 3.0.41 NOT building

Open
#12,099 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

I am following the exact steps provided for Swagger Codegen version 3.X. I have cloned the GitHub repo and checked out the 3.0.0 branch

Version Build -> 3.041

It is instructed to run '' mvn clean package ". Upon running that command, the build fails upon the swagger-generator

Command line used for generation

git clone https://github.com/swagger-api/swagger-codegen cd swagger-codegen git checkout 3.0.0 mvn clean package

Error Log

[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.079 s <<< FAILURE! - in io.swagger.v3.generator.online.GeneratorControllerTest
[ERROR] generateBashWithAndWithoutSecurityThreat(io.swagger.v3.generator.online.GeneratorControllerTest) Time elapsed: 1.727 s <<< FAILURE!
java.lang.AssertionError: expected [200] but found [500]
at io.swagger.v3.generator.online.GeneratorControllerTest.generateBashWithAndWithoutSecurityThreat(GeneratorControllerTest.java:87)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] GeneratorControllerTest.generateBashWithAndWithoutSecurityThreat:87 expected [200] but found [500]
[INFO]
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for swagger-codegen-project 3.0.42-SNAPSHOT:
[INFO]
[INFO] swagger-codegen-project ............................ SUCCESS [ 1.473 s]
[INFO] swagger-codegen (core library) ..................... SUCCESS [01:42 min]
[INFO] swagger-codegen (executable) ....................... SUCCESS [ 32.771 s]
[INFO] swagger-codegen (maven-plugin) ..................... SUCCESS [ 5.608 s]
[INFO] swagger-generator .................................. FAILURE [ 19.507 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:42 min
[INFO] Finished at: 2023-03-29T10:25:53-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (test-testng) on project swagger-generator: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\nisht\swagger-codegen\modules\swagger-generator\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR]

Problem

I am not sure why this is causing an issue in cleaning the package. The tests succeeded for everything else except for Swagger-generator. The error is very vague and not to sure why it is caused when running a clean command. Please let me know of a solution.

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 in modules/swagger-generator with GeneratorControllerTest.generateBashWithAndWithoutSecurityThreat, especially the assertion at line 87, and inspect the surefire reports referenced in the build output. Reproduce with the provided checkout and mvn clean package command; done means the failing test returns 200 and the full build passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
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.