Skip to content

[REQ] Use full qualified class name in Swagger annotation #23359

@koalalam

Description

@koalalam

There is a name conflict with a component class called "Schema". Here is the Gradle config:

openApiGenerate {
  generatorName.set("jaxrs-spec")
  modelPackage.set("my.package.model")
  configOptions.set(
    mapOf(
      "useJakartaEe" to "true",
      "useSwaggerV3Annotations" to "true"
    )
  )
}

The following code will be generated:

package my.package.model;

import io.swagger.v3.oas.annotations.media.Schema;

@Schema(description="Schema")
@jakarta.annotation.Generated(value = "...")
public class Schema implements Serializable {

}

Using full qualified class name like JakartaEe would solve the naming conflict issue.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions