swagger-api / swagger-api/swagger-codegen
[java/resttemplate] BUG jsr250-api not included in maven pom.xml
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
- Create a java/resttemplate project.
- Inspect the pom.xml
- Notice the missing dependency.
Related issues/PRs
Suggest a fix/enhancement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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