File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -595,9 +595,13 @@ public void processOpts() {
595595 }
596596
597597 // imports for pojos
598- importMapping .put ("ApiModelProperty" , "io.swagger.annotations.ApiModelProperty" );
599- importMapping .put ("ApiModel" , "io.swagger.annotations.ApiModel" );
600- importMapping .put ("Schema" , "io.swagger.v3.oas.annotations.media.Schema" );
598+ if (AnnotationLibrary .SWAGGER1 .equals (getAnnotationLibrary ())) {
599+ importMapping .put ("ApiModelProperty" , "io.swagger.annotations.ApiModelProperty" );
600+ importMapping .put ("ApiModel" , "io.swagger.annotations.ApiModel" );
601+ } else if (AnnotationLibrary .SWAGGER2 .equals (getAnnotationLibrary ())) {
602+ importMapping .put ("Schema" , "io.swagger.v3.oas.annotations.media.Schema" );
603+ }
604+
601605 importMapping .put ("BigDecimal" , "java.math.BigDecimal" );
602606 importMapping .put ("JsonDeserialize" , "com.fasterxml.jackson.databind.annotation.JsonDeserialize" );
603607 importMapping .put ("JsonProperty" , "com.fasterxml.jackson.annotation.JsonProperty" );
You can’t perform that action at this time.
0 commit comments