|
22 | 22 | import io.swagger.v3.oas.models.Operation; |
23 | 23 | import io.swagger.v3.oas.models.PathItem; |
24 | 24 | import io.swagger.v3.oas.models.media.ArraySchema; |
| 25 | +import io.swagger.v3.oas.models.media.MapSchema; |
25 | 26 | import io.swagger.v3.oas.models.media.Schema; |
26 | | -import org.apache.commons.lang3.StringUtils; |
27 | 27 | import org.slf4j.Logger; |
28 | 28 | import org.slf4j.LoggerFactory; |
29 | 29 |
|
30 | 30 | import java.io.File; |
31 | 31 | import java.io.IOException; |
32 | 32 | import java.io.Writer; |
33 | 33 | import java.net.URL; |
34 | | -import java.util.*; |
| 34 | +import java.util.ArrayList; |
| 35 | +import java.util.Arrays; |
| 36 | +import java.util.HashMap; |
| 37 | +import java.util.LinkedHashMap; |
| 38 | +import java.util.LinkedList; |
| 39 | +import java.util.List; |
| 40 | +import java.util.Map; |
35 | 41 | import java.util.regex.Matcher; |
36 | 42 | import java.util.stream.Collectors; |
37 | 43 |
|
@@ -475,7 +481,7 @@ public CodegenProperty fromProperty(String name, Schema propertySchema) { |
475 | 481 | CodegenProperty codegenProperty = super.fromProperty(name, propertySchema); |
476 | 482 | if (propertySchema != null && propertySchema.get$ref() != null) { |
477 | 483 | Schema refSchema = OpenAPIUtil.getSchemaFromRefSchema(propertySchema, this.openAPI); |
478 | | - if (refSchema != null && !isObjectSchema(refSchema) && !(refSchema instanceof ArraySchema) && refSchema.getEnum() == null) { |
| 484 | + if (refSchema != null && !isObjectSchema(refSchema) && !(refSchema instanceof ArraySchema) && !(refSchema instanceof MapSchema) && refSchema.getEnum() == null) { |
479 | 485 | setSchemaProperties(name, codegenProperty, refSchema); |
480 | 486 | processPropertySchemaTypes(name, codegenProperty, refSchema); |
481 | 487 | } |
|
0 commit comments