Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #7032
Closed
Open
Issue created Jul 23, 2020 by Administrator@rootContributor

[REQ] Improvment additionalModelTypeAnnotations

Created by: UnleashSpirit

Is your feature request related to a problem? Please describe.

Not really, there is a "workaround" I need multiple model annotations but the additionalModelTypeAnnotations is not really clear If you want multiple you need either to write all of them oneline or one by line which result in lot of useleff blank space (ok not a big deal)

Exemples

Using

<additionalModelTypeAnnotations>
	@lombok.Builder
	@lombok.NoArgsConstructor
	@lombok.AllArgsConstructor
</additionalModelTypeAnnotations>

Result in

									@lombok.Builder
									@lombok.NoArgsConstructor
									@lombok.AllArgsConstructor

public class xxxDTO   {

Yes there is a lots of spaces


Using

<additionalModelTypeAnnotations>@lombok.Builder @lombok.NoArgsConstructor @lombok.AllArgsConstructor</additionalModelTypeAnnotations>

Result in

@lombok.Builder @lombok.NoArgsConstructor @lombok.AllArgsConstructor

public class xxxDTO   {

Better but with long annotation like, @com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS) not really good

Describe the solution you'd like

Something like :

<additionalModelTypeAnnotations>
	<additionalModelTypeAnnotation>@lombok.Builder</additionalModelTypeAnnotation>
	<additionalModelTypeAnnotation>@lombok.NoArgsConstructor</additionalModelTypeAnnotation>
	<additionalModelTypeAnnotation>@lombok.AllArgsConstructor</additionalModelTypeAnnotation>
</additionalModelTypeAnnotations>

Hoping result

@lombok.Builder
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor

public class xxxDTO   {

Describe alternatives you've considered

I try using comma but they are kept in generated sources so complitation fails
Multiple , only the last one is generated

Additional context

I used lombok exemple but it's more general generatorName : spring

Assignee
Assign to
Time tracking