swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

[JAVA] dependency missing

Open TPunkiee opened this issue 1 year ago • 0 comments

Description

Out of the box, the produced client code has api unit tests. These don't run because there is a missing dependecy:

    <dependency>
     <groupId>org.glassfish.web</groupId>
     <artifactId>javax.el</artifactId>
     <version>2.2.4</version>
  </dependency>

Swagger-codegen version
java -jar swagger-codegen-cli-3.0.61.jar generate -v -i  api-docs-annotated-2.8.8.json -l java -c config.json -o swagger_std_288
$ cat config.json 
{
  "io.swagger.parser.util.RemoteUrl.trustAll": "true",
  "hideGenerationTimestamp": "true",
  "useBeanValidation": "true",
  "dateLibrary": "java11",
  "performBeanValidation": "true"
}
Steps to reproduce
  1. Generate code as above
  2. Open this dir as a new IDEA project (2024.1)
  3. load maven project
  4. execute any api unit test
Suggest a fix/enhancement

Generate the dependecy

    <dependency>
     <groupId>org.glassfish.web</groupId>
     <artifactId>javax.el</artifactId>
     <version>2.2.4</version>
  </dependency>

TPunkiee avatar Aug 14 '24 21:08 TPunkiee