OpenAPITools / OpenAPITools/openapi-generator

[REQ] Option to exclude the comment header in all generated files

Open
#19,836 1 comment 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

Issue Description

There should be an option to exclude the header comment at the beginning of files.

This is making it very difficult to review PRs with very small changes because all the files are affected whenever the version number changes.

Usually we don't commit the generated code but in this case the generator from npm doesn't work and we're using the cli but I don't expect all the developers working on the monorepo to have JRE and the openai-generator-cli installed.

Describe alternatives you've considered

There's a generator called orval that we use for Tanstack ReactQuery client generation and one of the options they offer is to exclude the header comments.
But the client I'm generating is for the backend so I can't use orval in this case

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 names no files, tests, or entry points. Start by tracing the CLI generation path and where the header comment is added; done means an option can suppress that comment across generated files without removing other generated content, with coverage for the affected generation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, 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.