File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed
swagger-compat-spec-parser
src/main/java/io/swagger/parser Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments