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
  • #2605
Closed
Open
Issue created Apr 05, 2019 by Administrator@rootContributor

[BUG][Spring] OpenAPI2SpringBoot inner class should be static

Created by: brabster

Bug Report Checklist

  • [ /] Have you provided a full/minimal spec to reproduce the issue?
  • [ /] Have you validated the input using an OpenAPI validator (example)?
  • [ /] What's the version of OpenAPI Generator used?
  • [ /] Have you search for related issues/PRs?
  • [ /] What's the actual output vs expected output?
  • [ /] [Optional] Bounty to sponsor the fix (example)
Description

SpotBugs reports that this ExitException should be a static inner class.

openapi-generator version

3.3.4

OpenAPI declaration file content or url

Ir's in OpenAPI2SpringBoot, I think it'll be a small fix on this line: https://github.com/OpenAPITools/openapi-generator/blob/b5ede4b339b630259a48f71098e5d2941ccf40dd/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/openapi2SpringBoot.mustache#L44

Command line used for generation

Maven plugin:

                          <generatorName>spring</generatorName>
                          <configOptions>
                                <sourceFolder>src/gen/java/main</sourceFolder>
                                <java8>true</java8>
                                <reactive>true</reactive>
                                <apiPackage>foo.bar.api</apiPackage>
                                <modelPackage>foo,bar.model</modelPackage>
                                <delegatePattern>true</delegatePattern>
                            </configOptions>
Steps to reproduce

Suspect it'll be there in any Spring Boot API

Related issues/PRs

None that I can see.

Suggest a fix

I think it'll just be the keyword static. I'll check and pop a PR in when I get a sec.

Assignee
Assign to
Time tracking