updated core dependency version to 1.5.2-M2 with related fixes

This commit is contained in:
Ole Lensmar
2015-05-20 18:06:37 -06:00
parent deca6a0329
commit 713e7a6584
4 changed files with 9 additions and 19 deletions

View File

@@ -16,7 +16,10 @@ public class CodegenProperty {
public String example;
public String jsonSchema;
public Double minimum, maximum, exclusiveMinimum, exclusiveMaximum;
public Double minimum;
public Double maximum;
public Boolean exclusiveMinimum;
public Boolean exclusiveMaximum;
public Boolean hasMore = null, required = null, secondaryParam = null;
public Boolean isPrimitiveType, isContainer, isNotContainer;
public boolean isEnum;

View File

@@ -1024,13 +1024,13 @@ public class DefaultCodegen {
return secs;
}
protected List<Map<String, String>> toExamples(Map<String, String> examples) {
protected List<Map<String, String>> toExamples(Map<String, Object> examples) {
if(examples == null)
return null;
List<Map<String, String>> output = new ArrayList<Map<String, String>>();
for(String key: examples.keySet()) {
String value = examples.get(key);
String value = String.valueOf(examples.get(key));
Map<String, String> kv = new HashMap<String, String>();
kv.put("contentType", key);

View File

@@ -22,7 +22,7 @@ public class ExampleGenerator {
this.examples = examples;
}
public List<Map<String, String>> generate(Map<String, String> examples, List<String> mediaTypes, Property property) {
public List<Map<String, String>> generate(Map<String, Object> examples, List<String> mediaTypes, Property property) {
List<Map<String, String>> output = new ArrayList<Map<String, String>>();
Set<String> processedModels = new HashSet<String>();
if(examples == null ) {
@@ -54,7 +54,7 @@ public class ExampleGenerator {
}
else {
for(String key: examples.keySet()) {
String value = examples.get(key);
String value = String.valueOf(examples.get(key));
Map<String, String> kv = new HashMap<String, String>();
kv.put("contentType", key);