OpenAPITools / OpenAPITools/openapi-generator

[BUG] Models of generator "jaxrs-spec" are missing `@Generated` annotations

Open
#3,922 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Bug Report Checklist
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
Description

When using the generator "jaxrs-spec", the generated model classes are missing @Generated annotations even when the generator option hideGeneratedTimestamp is set to false. The generated api-interface is annotated correctly.

openapi-generator version

Gradle plugin "org.openapi.generator" version "4.1.2".

Command line used for generation

Gradle configuration of the GenerateTask object:

  generatorName = "jaxrs-spec"
  inputSpec = "myspec.yaml"  
  outputDir = "myoutputDir"
  apiPackage = "my.package.api"
  modelPackage = "my.package.model"
  configOptions = [
    dateLibrary: "java8",
    interfaceOnly: "true",
    returnResponse: "true",
    generatePom: "false",
    useTags: "true",
    hideGenerationTimestamp: "false"
  ]

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 reproducing the issue with the supplied Gradle GenerateTask configuration and the jaxrs-spec generator, then inspect how generated model classes differ from the correctly annotated API interface. Done means model classes include @Generated when hideGenerationTimestamp is false, while generation still produces the expected API output.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.