swagger-codegen-generators icon indicating copy to clipboard operation
swagger-codegen-generators copied to clipboard

Swagger-codegen-maven-plugin code generation doesn't use OAS3 annotation for spring-cloud

Open Giovanni007 opened this issue 4 years ago • 1 comments

When using swagger-codegen-maven-plugin version 3.0.29 with configuration:

  <language>spring</language>
  <library>spring-cloud</library>    

classes are generated using old Swagger 1.5.x / OAS 2.x annotations instead of OAS3 annotations. In my understanding, this should happen only when configuring it using the property useOas2 but the plugin should generate OAS3 annotations by default. Am I missing something?

Giovanni007 avatar Oct 21 '21 11:10 Giovanni007

Still doesn't work.The mustaches falsely use #useOas2 instead of isUseOas2 (patched the mustaches to test this). Furthermore springboot3 support isn't included, although it technically works. Why is oas2 forced with spring-cloud. I'd like to use spring-cloud with oas2=false. In the master branch there is already boot3 support, but not for spring-cloud. Spring-cloud still forces oas2. This doesn't make sense. :(.

FrostbittenKing avatar Sep 03 '23 14:09 FrostbittenKing