swagger-api / swagger-api/swagger-codegen

[JAVA] No maven wrapper in generated code - Feature Request

Open
#10,420 3 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'm using swagger-codegen-gradle-plugin and swagger-codegen-cli:3.0.18 to generate a Java client for my project. I understand it is mentioned in the swagger readme to use mvn install to build the generated client but I don't want my users to have to separately install maven just for using the generated API client.

That is why I require a maven wrapper in the generated code so that the users can simply use ./mvnw install to build the generated code and not install maven separately. This also solves the problem of version conflicts with already installed maven for some users.

Swagger-codegen version
  • io.swagger.codegen.v3:swagger-codegen-cli:3.0.18
  • gradle.plugin.org.hidetake:gradle-swagger-generator-plugin:2.18.2
  • io.swagger.core.v3:swagger-gradle-plugin:2.1.4
Related issues/PRs

This PR Adds a maven wrapper to the swagger-codegen project but not to the generated code.

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 by reviewing the generated Java client templates and the related pull request #7356, which adds a Maven wrapper to the main project but not generated code. Determine how generated files are assembled, then verify that a generated client includes the wrapper and can build with ./mvnw install without a separately installed Maven.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.