1
1
// swagger-ui.js
2
- // version 2.1.0-alpha.5
2
+ // version 2.1.0-alpha.6
3
3
$ ( function ( ) {
4
4
5
5
// Helper function for vertically aligning DOM elements
@@ -712,7 +712,7 @@ function program5(depth0,data) {
712
712
713
713
var buffer = "" , stack1 ;
714
714
buffer += "\n " ;
715
- stack1 = helpers [ 'if' ] . call ( depth0 , depth0 . defaultValue , { hash :{ } , inverse :self . program ( 8 , program8 , data ) , fn :self . program ( 6 , program6 , data ) , data :data } ) ;
715
+ stack1 = helpers [ 'if' ] . call ( depth0 , depth0 [ 'default' ] , { hash :{ } , inverse :self . program ( 8 , program8 , data ) , fn :self . program ( 6 , program6 , data ) , data :data } ) ;
716
716
if ( stack1 || stack1 === 0 ) { buffer += stack1 ; }
717
717
buffer += "\n " ;
718
718
return buffer ;
@@ -830,8 +830,8 @@ function program1(depth0,data) {
830
830
else { stack1 = depth0 . name ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
831
831
buffer += escapeExpression ( stack1 )
832
832
+ "'>" ;
833
- if ( stack1 = helpers . defaultValue ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
834
- else { stack1 = depth0 . defaultValue ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
833
+ if ( stack1 = helpers [ 'default' ] ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
834
+ else { stack1 = depth0 [ 'default' ] ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
835
835
buffer += escapeExpression ( stack1 )
836
836
+ "</textarea>\n " ;
837
837
return buffer ;
@@ -841,7 +841,7 @@ function program3(depth0,data) {
841
841
842
842
var buffer = "" , stack1 ;
843
843
buffer += "\n " ;
844
- stack1 = helpers [ 'if' ] . call ( depth0 , depth0 . defaultValue , { hash :{ } , inverse :self . program ( 6 , program6 , data ) , fn :self . program ( 4 , program4 , data ) , data :data } ) ;
844
+ stack1 = helpers [ 'if' ] . call ( depth0 , depth0 [ 'default' ] , { hash :{ } , inverse :self . program ( 6 , program6 , data ) , fn :self . program ( 4 , program4 , data ) , data :data } ) ;
845
845
if ( stack1 || stack1 === 0 ) { buffer += stack1 ; }
846
846
buffer += "\n " ;
847
847
return buffer ;
@@ -850,8 +850,8 @@ function program4(depth0,data) {
850
850
851
851
var buffer = "" , stack1 ;
852
852
buffer += "\n " ;
853
- if ( stack1 = helpers . defaultValue ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
854
- else { stack1 = depth0 . defaultValue ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
853
+ if ( stack1 = helpers [ 'default' ] ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
854
+ else { stack1 = depth0 [ 'default' ] ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
855
855
buffer += escapeExpression ( stack1 )
856
856
+ "\n " ;
857
857
return buffer ;
@@ -898,8 +898,8 @@ function program1(depth0,data) {
898
898
else { stack1 = depth0 . name ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
899
899
buffer += escapeExpression ( stack1 )
900
900
+ "'>" ;
901
- if ( stack1 = helpers . defaultValue ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
902
- else { stack1 = depth0 . defaultValue ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
901
+ if ( stack1 = helpers [ 'default' ] ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
902
+ else { stack1 = depth0 [ 'default' ] ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
903
903
buffer += escapeExpression ( stack1 )
904
904
+ "</textarea>\n " ;
905
905
return buffer ;
@@ -909,7 +909,7 @@ function program3(depth0,data) {
909
909
910
910
var buffer = "" , stack1 ;
911
911
buffer += "\n " ;
912
- stack1 = helpers [ 'if' ] . call ( depth0 , depth0 . defaultValue , { hash :{ } , inverse :self . program ( 6 , program6 , data ) , fn :self . program ( 4 , program4 , data ) , data :data } ) ;
912
+ stack1 = helpers [ 'if' ] . call ( depth0 , depth0 [ 'default' ] , { hash :{ } , inverse :self . program ( 6 , program6 , data ) , fn :self . program ( 4 , program4 , data ) , data :data } ) ;
913
913
if ( stack1 || stack1 === 0 ) { buffer += stack1 ; }
914
914
buffer += "\n " ;
915
915
return buffer ;
@@ -918,8 +918,8 @@ function program4(depth0,data) {
918
918
919
919
var buffer = "" , stack1 ;
920
920
buffer += "\n " ;
921
- if ( stack1 = helpers . defaultValue ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
922
- else { stack1 = depth0 . defaultValue ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
921
+ if ( stack1 = helpers [ 'default' ] ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
922
+ else { stack1 = depth0 [ 'default' ] ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
923
923
buffer += escapeExpression ( stack1 )
924
924
+ "\n " ;
925
925
return buffer ;
@@ -982,7 +982,7 @@ function program4(depth0,data) {
982
982
983
983
var buffer = "" , stack1 ;
984
984
buffer += "\n " ;
985
- stack1 = helpers [ 'if' ] . call ( depth0 , depth0 . defaultValue , { hash :{ } , inverse :self . program ( 7 , program7 , data ) , fn :self . program ( 5 , program5 , data ) , data :data } ) ;
985
+ stack1 = helpers [ 'if' ] . call ( depth0 , depth0 [ 'default' ] , { hash :{ } , inverse :self . program ( 7 , program7 , data ) , fn :self . program ( 5 , program5 , data ) , data :data } ) ;
986
986
if ( stack1 || stack1 === 0 ) { buffer += stack1 ; }
987
987
buffer += "\n " ;
988
988
return buffer ;
@@ -995,8 +995,8 @@ function program5(depth0,data) {
995
995
else { stack1 = depth0 . name ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
996
996
buffer += escapeExpression ( stack1 )
997
997
+ "'>" ;
998
- if ( stack1 = helpers . defaultValue ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
999
- else { stack1 = depth0 . defaultValue ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
998
+ if ( stack1 = helpers [ 'default' ] ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
999
+ else { stack1 = depth0 [ 'default' ] ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
1000
1000
buffer += escapeExpression ( stack1 )
1001
1001
+ "</textarea>\n " ;
1002
1002
return buffer ;
@@ -1037,7 +1037,7 @@ function program12(depth0,data) {
1037
1037
1038
1038
var buffer = "" , stack1 ;
1039
1039
buffer += "\n " ;
1040
- stack1 = helpers [ 'if' ] . call ( depth0 , depth0 . defaultValue , { hash :{ } , inverse :self . program ( 15 , program15 , data ) , fn :self . program ( 13 , program13 , data ) , data :data } ) ;
1040
+ stack1 = helpers [ 'if' ] . call ( depth0 , depth0 [ 'default' ] , { hash :{ } , inverse :self . program ( 15 , program15 , data ) , fn :self . program ( 13 , program13 , data ) , data :data } ) ;
1041
1041
if ( stack1 || stack1 === 0 ) { buffer += stack1 ; }
1042
1042
buffer += "\n " ;
1043
1043
return buffer ;
@@ -1050,8 +1050,8 @@ function program13(depth0,data) {
1050
1050
else { stack1 = depth0 . name ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
1051
1051
buffer += escapeExpression ( stack1 )
1052
1052
+ "' placeholder='(required)' type='text' value='" ;
1053
- if ( stack1 = helpers . defaultValue ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
1054
- else { stack1 = depth0 . defaultValue ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
1053
+ if ( stack1 = helpers [ 'default' ] ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
1054
+ else { stack1 = depth0 [ 'default' ] ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
1055
1055
buffer += escapeExpression ( stack1 )
1056
1056
+ "'/>\n " ;
1057
1057
return buffer ;
@@ -2354,6 +2354,9 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
2354
2354
this . model . isFile = true ;
2355
2355
}
2356
2356
this . model [ "default" ] = this . model [ "default" ] || this . model . defaultValue ;
2357
+ if ( this . model . allowableValues ) {
2358
+ this . model . isList = true ;
2359
+ }
2357
2360
template = this . template ( ) ;
2358
2361
$ ( this . el ) . html ( template ( this . model ) ) ;
2359
2362
signatureModel = {
0 commit comments