Merge pull request #766 from swagger-api/core-1.5.2-M2-compatibility

updated core dependency version to 1.5.2-M2 with related fixes
This commit is contained in:
Tony Tam
2015-05-20 17:55:01 -07:00
4 changed files with 9 additions and 6 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);

View File

@@ -453,7 +453,7 @@
<swagger-parser-version>1.0.6-SNAPSHOT</swagger-parser-version>
<scala-version>2.10.4</scala-version>
<felix-version>2.3.4</felix-version>
<swagger-core-version>1.5.1-M2</swagger-core-version>
<swagger-core-version>1.5.2-M2</swagger-core-version>
<scala-test-version>2.1.4</scala-test-version>
<commons-io-version>2.3</commons-io-version>
<commons-cli-version>1.2</commons-cli-version>