@@ -325,7 +325,6 @@ SwaggerClient.prototype.initialize = function (url, options) {
325
325
326
326
if ( typeof options . success === 'function' ) {
327
327
this . build ( ) ;
328
- // this.isBuilt = true;
329
328
}
330
329
} ;
331
330
@@ -1214,7 +1213,6 @@ Model.prototype.getMockSignature = function(modelsToIgnore) {
1214
1213
prop = this . properties [ i ] ;
1215
1214
propertiesStr . push ( prop . toString ( ) ) ;
1216
1215
}
1217
-
1218
1216
var strong = '<span class="strong">' ;
1219
1217
var stronger = '<span class="stronger">' ;
1220
1218
var strongClose = '</span>' ;
@@ -1326,8 +1324,10 @@ Property.prototype.sampleValue = function(isArray, ignoredModels) {
1326
1324
1327
1325
getStringSignature = function ( obj ) {
1328
1326
var str = '' ;
1329
- if ( typeof obj . type === 'undefined' )
1330
- str += obj ;
1327
+ if ( typeof obj . $ref !== 'undefined' )
1328
+ str += simpleRef ( obj . $ref ) ;
1329
+ else if ( typeof obj . type === 'undefined' )
1330
+ str += 'object' ;
1331
1331
else if ( obj . type === 'array' ) {
1332
1332
str += 'Array[' ;
1333
1333
str += getStringSignature ( ( obj . items || obj . $ref || { } ) ) ;
@@ -1383,9 +1383,27 @@ Property.prototype.toString = function() {
1383
1383
if ( typeof this . description !== 'undefined' )
1384
1384
str += ': ' + this . description ;
1385
1385
1386
+ if ( this [ 'enum' ] ) {
1387
+ str += ' = <span class="propVals">[\'' + this [ 'enum' ] . join ( '\' or \'' ) + '\']</span>' ;
1388
+ }
1389
+ if ( this . descr ) {
1390
+ str += ': <span class="propDesc">' + this . descr + '</span>' ;
1391
+ }
1392
+
1393
+
1386
1394
var options = '' ;
1387
1395
var isArray = this . schema . type === 'array' ;
1388
- var type = isArray ? this . schema . items . type : this . schema . type ;
1396
+ var type ;
1397
+
1398
+ if ( isArray ) {
1399
+ if ( this . schema . items )
1400
+ type = this . schema . items . type ;
1401
+ else
1402
+ type = '' ;
1403
+ }
1404
+ else {
1405
+ this . schema . type ;
1406
+ }
1389
1407
1390
1408
if ( this . default )
1391
1409
options += optionHtml ( 'Default' , this . default ) ;
@@ -1973,7 +1991,7 @@ SwaggerModelProperty.prototype.toString = function () {
1973
1991
}
1974
1992
str += ')' ;
1975
1993
if ( this . values ) {
1976
- str += ' = <span class="propVals">[" ' + this . values . join ( '\' or \'' ) + '\']</span>' ;
1994
+ str += ' = <span class="propVals">[\' ' + this . values . join ( '\' or \'' ) + '\']</span>' ;
1977
1995
}
1978
1996
if ( this . descr ) {
1979
1997
str += ': <span class="propDesc">' + this . descr + '</span>' ;
0 commit comments