OpenAPITools / OpenAPITools/openapi-generator

[REQ] Examples of Using Generated Client from Maven Plugin

Open
#18,918 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

The maven build plugin generates a full maven project with a pom.xml in the target/generated-sources folder. This has all the dependencies required for utilizing the generated code. But does not install any required dependencies or the artifact/module itself.
 
It is not clear how to effectively use the generated code from the maven build plugin, and several questions have been asked on StackOverflow about it:

Describe the solution you'd like

Either create documentation for using this generated code, or have some examples of it.

Describe alternatives you've considered

It seems there are two ways people are handling this:

  1. Essentially copy the entire contents of <dependencies> from the generated maven file into the project pom.xml
  2. Use a parent project with the generated code and project code as submodules (I am a bit unclear about how people are accomplishing this)

Ideally either there would be clear documentation or there would be a better way of utilizing 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 with the generated Maven project and pom.xml under target/generated-sources, then review the linked Stack Overflow questions for the usage problems to address. Document or demonstrate how a project can consume the generated code and its dependencies; done means a newcomer can follow the example without manually guessing how to integrate the generated artifact.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.