OpenAPITools / OpenAPITools/openapi-generator
[BUG] OpenAPI code generator does not add the generated code comment for c# generated code
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
It is convention that generated code, that will be regenerated and is discurraged to be edited manually have following comment at its start of file:
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
This allows 3rd party tools to disable refactoring and linting
openapi-generator version
OpenAPI Generator v5.0.1
Generation Details
Running with https://github.com/christianhelle/apiclientcodegen
Suggest a fix
Add the header whenever a file is generated
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with OpenAPI Generator v5.0.1 and the linked apiclientcodegen setup, then inspect the C# generation path and its generated files. Done means every generated C# file begins with the requested auto-generated header, with behavior verified against the generator output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100