diff --git a/pom.xml b/pom.xml
index 97ee3a0602..1c2286b80d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
io.swagger.codegen.v3
swagger-codegen-generators
- 1.0.27-SNAPSHOT
+ 1.0.28-SNAPSHOT
jar
@@ -252,10 +252,10 @@
- 3.0.27-SNAPSHOT
- 2.0.26
- 2.1.9
- 2.11.4
+ 3.0.28-SNAPSHOT
+ 2.0.27
+ 2.1.10
+ 2.12.1
2.11.1
3.3.0
2.4
diff --git a/src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java b/src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java
index 3273c05a07..326fb5d306 100644
--- a/src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java
+++ b/src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java
@@ -1358,12 +1358,7 @@ public CodegenModel fromModel(String name, Schema schema, Map al
addParentContainer(codegenModel, name, schema);
}
else if (schema instanceof MapSchema) {
- codegenModel.getVendorExtensions().put(CodegenConstants.IS_MAP_CONTAINER_EXT_NAME, Boolean.TRUE);
- codegenModel.getVendorExtensions().put(IS_CONTAINER_EXT_NAME, Boolean.TRUE);
- addParentContainer(codegenModel, name, schema);
- if (hasSchemaProperties(schema) || hasTrueAdditionalProperties(schema)) {
- addAdditionPropertiesToCodeGenModel(codegenModel, schema);
- }
+ processMapSchema(codegenModel, name, schema);
}
else if (schema instanceof ComposedSchema) {
@@ -1493,6 +1488,15 @@ else if (schema instanceof ComposedSchema) {
return codegenModel;
}
+ protected void processMapSchema(CodegenModel codegenModel, String name, Schema schema) {
+ codegenModel.getVendorExtensions().put(CodegenConstants.IS_MAP_CONTAINER_EXT_NAME, Boolean.TRUE);
+ codegenModel.getVendorExtensions().put(IS_CONTAINER_EXT_NAME, Boolean.TRUE);
+ addParentContainer(codegenModel, name, schema);
+ if (hasSchemaProperties(schema) || hasTrueAdditionalProperties(schema)) {
+ addAdditionPropertiesToCodeGenModel(codegenModel, schema);
+ }
+ }
+
/**
* Recursively look for a discriminator in the interface tree
*/
diff --git a/src/main/java/io/swagger/codegen/v3/generators/examples/ExampleGenerator.java b/src/main/java/io/swagger/codegen/v3/generators/examples/ExampleGenerator.java
index c90c599d34..ea1358a14d 100644
--- a/src/main/java/io/swagger/codegen/v3/generators/examples/ExampleGenerator.java
+++ b/src/main/java/io/swagger/codegen/v3/generators/examples/ExampleGenerator.java
@@ -195,6 +195,10 @@ private Object resolveSchemaToExample(String propertyName, String mediaType, Sch
Schema innerType = ((ArraySchema) schema).getItems();
if (innerType != null) {
int arrayLength = schema.getMaxItems() != null ? schema.getMaxItems() : 2;
+ if (arrayLength > 10) {
+ logger.warn("value of maxItems of property {} is {}; limiting to 10 examples", schema, arrayLength);
+ arrayLength = 10;
+ }
Object[] objectProperties = new Object[arrayLength];
Object objProperty = resolveSchemaToExample(propertyName, mediaType, innerType, processedModels);
for(int i=0; i < arrayLength; i++) {
diff --git a/src/main/java/io/swagger/codegen/v3/generators/java/SpringCodegen.java b/src/main/java/io/swagger/codegen/v3/generators/java/SpringCodegen.java
index cad0c19ddf..c77711db1a 100644
--- a/src/main/java/io/swagger/codegen/v3/generators/java/SpringCodegen.java
+++ b/src/main/java/io/swagger/codegen/v3/generators/java/SpringCodegen.java
@@ -876,6 +876,11 @@ protected List