[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.