OpenAPITools / OpenAPITools/openapi-generator

[REQ] Maven plugin: Invoking the generate plugin goal directly does not work.

Open
#7,513 3 comments 10 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

Problem

I want to bring attention to a closed issue: #2207

Calling the plugin goal directly, I would except the code generator to generate the code. But it only works as part of the compile phase.

Suggested solution

I'd expect the codegen to have goal, that can be called simply with the generate-sources phase (or directly). It would then generate the code according to the docs.

Alternative

If fore some reason it is not possible to do it without the compile phase, documentation that explains this or some more descriptive error message could appear to the user.

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

The issue mentions the Maven plugin goal, the compile phase, and the generate-sources phase but names no files or tests. First reproduce direct goal and generate-sources invocations, then inspect the Maven plugin goal configuration and documentation. Done means direct generation works as requested, or the limitation is documented with a clearer error message.

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.