From 880c8da6522688e2a6649e1f91ce11dfc19e8b87 Mon Sep 17 00:00:00 2001 From: George Sibble Date: Mon, 27 May 2013 17:39:35 -0700 Subject: [PATCH] Create proper example JSON --- dist/lib/swagger.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/dist/lib/swagger.js b/dist/lib/swagger.js index b1f3abff..6af16a20 100644 --- a/dist/lib/swagger.js +++ b/dist/lib/swagger.js @@ -403,7 +403,20 @@ if (this.isArray) { result = this.refDataType; } else { - result = this.dataType; + if(this.dataType === 'int'){ + result = 0; + + }else if(this.dataType === 'long' || this.dataType === 'float'){ + result = parseFloat("0.1"); + } + else if(this.dataType === 'boolean') + { + result = false; + } + else + { + result = this.dataType; + } } } if (this.isArray) {