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
  • #10746
Closed
Open
Issue created Oct 31, 2021 by Administrator@rootContributor

[REQ] [JAX-RS] break line before class definition

Created by: michal-kudla

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

Currently, we he one line with annotations and class definition, eg @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", date = "2021-10-31T19:49:50.670718263+01:00[Europe/Warsaw]")public class Pet {

Describe the solution you'd like

simple patch is add to an \n before class definition in JavaJaxRS/spec/pojo.mustache file

` Index: modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8

diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache (revision 9546a5a6) +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache (date 1635707906395) @@ -12,7 +12,8 @@ **/{{/description}} {{#useSwaggerAnnotations}}{{#description}}@ApiModel(description = "{{{.}}}"){{/description}}{{/useSwaggerAnnotations}} @JsonTypeName("{{name}}") -{{>generatedAnnotation}}{{>additionalModelTypeAnnotations}}public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{>generatedAnnotation}}{{>additionalModelTypeAnnotations}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}}

{{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}}

`

Describe alternatives you've considered

Additional context

Assignee
Assign to
Time tracking