OpenAPITools / OpenAPITools/openapi-generator

[REQ] Post process mechanism close to impossibly to use via maven

Open
#22,941 0 comments 0 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.

post processing requires an environment variable to be set. Using maven it's not (nor considered safe) possible to set an environment as part of the build. Instead you must pass it to the build tool. That makes that setting not part of the build description and becomes a source of error or would require validation when starting the build. Moreover it would not be considered serious.

Describe the solution you'd like

make it a command line argument .... and make it possible to set that argument from the openapi-generator-maven-plugin. Unsure if the maven plugin uses command line or uses the generator classes directly.

Describe alternatives you've considered

I used maven exec plugin to execute manual post process in maven's process-sources phase. Sadly many common plugins fork builds and runs the generate-sources phase (ie javadoc, source, etc ) WO calling process-sources. Thus leaving sources unprocessed. There are elaborate maven tweaks around this but I feel I'm leaving convention.

Additional context

Using the maven plugin in springdoc based project. Most up to date versions as of writing.

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 tracing how post-processing is configured and invoked through the generator command-line entry point and the openapi-generator-maven-plugin. Confirm how Maven plugin configuration reaches the generator, then verify that the post-processing setting can be declared in the build and is applied during the relevant generation phase.

Written by the indexing model from the issue text.

Assessment

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