swagger-api / swagger-api/swagger-codegen

[java/resttemplate] BUG jsr250-api not included in maven pom.xml

Open
#9,157 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

The code generated by the java/resttemplate module does not include jsr250-api in pom.xml -- but it is included in build.gradle.

Swagger-codegen version

2.4.1

Swagger declaration file content or url

https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/yaml/petstore.yaml

Command line used for generation
java -jar swagger-codegen-cli.jar generate  \
     -i https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/yaml/petstore.yaml \
     -l java \
     -c spring.json \
     -o patient-detail-client

contents of spring.json

{
  "modelPackage" : "com.example.model",
  "apiPackage"   : "com.example.api",
  "invokerPackage" : "com.example.invoker",
  "groupId" : "com.example",
  "artifactId"  : "its-a-bug",
  "fullJavaUtil" : true,
  "dateLibrary" : "java8",
  "library" :  "resttemplate"
}   
Steps to reproduce
  1. Create a java/resttemplate project.
  2. Inspect the pom.xml
  3. Notice the missing dependency.
Related issues/PRs
Suggest a fix/enhancement

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

Generate a java/resttemplate project with the petstore specification and the shown command, then inspect its pom.xml and compare it with build.gradle. Confirm that jsr250-api is present in the Gradle dependencies but absent from the Maven output; done means the generated pom.xml includes the dependency.

Written by the indexing model from the issue text.

Assessment

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