Skip to content

Commit 08b37f9

Browse files
committed
Merge pull request #18 from swagger-api/develop
Merged from develop
2 parents 8935bed + 2716b84 commit 08b37f9

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

modules/swagger-compat-spec-parser/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<parent>
44
<groupId>io.swagger</groupId>
55
<artifactId>swagger-parser-project</artifactId>
6-
<version>1.0.1</version>
6+
<version>1.0.2</version>
77
<relativePath>../..</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010
<groupId>io.swagger</groupId>
1111
<artifactId>swagger-compat-spec-parser</artifactId>
12-
<version>1.0.1</version>
12+
<version>1.0.2</version>
1313
<packaging>jar</packaging>
1414
<name>swagger-compat-spec-parser</name>
1515
<dependencies>

modules/swagger-compat-spec-parser/src/main/java/io/swagger/parser/SwaggerCompatConverter.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ else if(ParamType.FORM.equals(param.getParamType())) {
180180

181181
output.setName(param.getName());
182182
output.setDescription(param.getDescription());
183-
output.setRequired(param.getRequired());
183+
if(param.getRequired() != null)
184+
output.setRequired(param.getRequired());
184185

185186
Property property = null;
186187
String type = param.getType() == null ? null : param.getType().toString();
@@ -264,6 +265,12 @@ public Property propertyFromTypedObject(ExtendedTypedObject obj) {
264265
if("array".equals(type)) {
265266
ArrayProperty am = new ArrayProperty();
266267
Items items = obj.getItems();
268+
if(items == null) {
269+
System.out.println("Error! Missing array type for property! Assuming `object` -- please fix your spec");
270+
Json.prettyPrint(obj);
271+
items = new Items();
272+
items.setType("object");
273+
}
267274
type = items.getType() == null ? null : items.getType().toString();
268275
format = items.getFormat() == null ? null : items.getFormat().toString();
269276

modules/swagger-parser/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<parent>
44
<groupId>io.swagger</groupId>
55
<artifactId>swagger-parser-project</artifactId>
6-
<version>1.0.1</version>
6+
<version>1.0.2</version>
77
<relativePath>../..</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010
<groupId>io.swagger</groupId>
1111
<artifactId>swagger-parser</artifactId>
12-
<version>1.0.1</version>
12+
<version>1.0.2</version>
1313
<packaging>jar</packaging>
1414
<name>swagger-parser</name>
1515
<dependencies>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<modelVersion>4.0.0</modelVersion>
99
<groupId>io.swagger</groupId>
1010
<artifactId>swagger-parser-project</artifactId>
11-
<version>1.0.1</version>
11+
<version>1.0.2</version>
1212
<packaging>pom</packaging>
1313
<name>swagger-parser-project</name>
1414
<developers>

0 commit comments

Comments
 (0)