File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed
modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -312,14 +312,34 @@ else if(p instanceof DateProperty)
312
312
return "null" ;
313
313
else if (p instanceof DateTimeProperty )
314
314
return "null" ;
315
- else if (p instanceof DoubleProperty )
315
+ else if (p instanceof DoubleProperty ) {
316
+ DoubleProperty dp = (DoubleProperty ) p ;
317
+ if (dp .getDefault () != null ) {
318
+ return dp .getDefault ().toString ();
319
+ }
316
320
return "null" ;
317
- else if (p instanceof FloatProperty )
321
+ }
322
+ else if (p instanceof FloatProperty ) {
323
+ FloatProperty dp = (FloatProperty ) p ;
324
+ if (dp .getDefault () != null ) {
325
+ return dp .getDefault ().toString ();
326
+ }
318
327
return "null" ;
319
- else if (p instanceof IntegerProperty )
328
+ }
329
+ else if (p instanceof IntegerProperty ) {
330
+ IntegerProperty dp = (IntegerProperty ) p ;
331
+ if (dp .getDefault () != null ) {
332
+ return dp .getDefault ().toString ();
333
+ }
320
334
return "null" ;
321
- else if (p instanceof LongProperty )
335
+ }
336
+ else if (p instanceof LongProperty ) {
337
+ LongProperty dp = (LongProperty ) p ;
338
+ if (dp .getDefault () != null ) {
339
+ return dp .getDefault ().toString ();
340
+ }
322
341
return "null" ;
342
+ }
323
343
else if (p instanceof MapProperty ) {
324
344
MapProperty ap = (MapProperty ) p ;
325
345
String inner = getSwaggerType (ap .getAdditionalProperties ());
Original file line number Diff line number Diff line change 427
427
<swagger-parser-version >1.0.5-SNAPSHOT</swagger-parser-version >
428
428
<scala-version >2.10.4</scala-version >
429
429
<felix-version >2.3.4</felix-version >
430
- <swagger-core-version >1.5.0 -M2</swagger-core-version >
430
+ <swagger-core-version >1.5.1 -M2-SNAPSHOT </swagger-core-version >
431
431
<scala-test-version >2.1.4</scala-test-version >
432
432
<commons-io-version >2.3</commons-io-version >
433
433
<commons-cli-version >1.2</commons-cli-version >
You can’t perform that action at this time.
0 commit comments