@@ -576,8 +576,6 @@ var OperationGroup = function(tag, operation) {
576576 this . name = tag ;
577577 this . operation = operation ;
578578 this . operationsArray = [ ] ;
579-
580- this . description = operation . description || "" ;
581579} ;
582580
583581var Operation = function ( parent , scheme , operationId , httpMethod , path , args , definitions ) {
@@ -742,10 +740,14 @@ Operation.prototype.getType = function (param) {
742740 str = 'long' ;
743741 else if ( type === 'integer' )
744742 str = 'integer' ;
745- else if ( type === 'string' && format === 'date-time' )
746- str = 'date-time' ;
747- else if ( type === 'string' && format === 'date' )
748- str = 'date' ;
743+ else if ( type === 'string' ) {
744+ if ( format === 'date-time' )
745+ str = 'date-time' ;
746+ else if ( format === 'date' )
747+ str = 'date' ;
748+ else
749+ str = 'string' ;
750+ }
749751 else if ( type === 'number' && format === 'float' )
750752 str = 'float' ;
751753 else if ( type === 'number' && format === 'double' )
@@ -754,8 +756,6 @@ Operation.prototype.getType = function (param) {
754756 str = 'double' ;
755757 else if ( type === 'boolean' )
756758 str = 'boolean' ;
757- else if ( type === 'string' )
758- str = 'string' ;
759759 else if ( type === 'array' ) {
760760 isArray = true ;
761761 if ( param . items )
@@ -1050,14 +1050,13 @@ Operation.prototype.execute = function(arg1, arg2, arg3, arg4, parent) {
10501050 if ( opts . mock === true )
10511051 return obj ;
10521052 else
1053- new SwaggerHttp ( ) . execute ( obj ) ;
1053+ new SwaggerHttp ( ) . execute ( obj , opts ) ;
10541054} ;
10551055
10561056Operation . prototype . setContentTypes = function ( args , opts ) {
10571057 // default type
10581058 var accepts = 'application/json' ;
10591059 var consumes = args . parameterContentType || 'application/json' ;
1060-
10611060 var allDefinedParams = this . parameters ;
10621061 var definedFormParams = [ ] ;
10631062 var definedFileParams = [ ] ;
@@ -2747,7 +2746,7 @@ SwaggerRequest.prototype.setHeaders = function (params, opts, operation) {
27472746 */
27482747var SwaggerHttp = function ( ) { } ;
27492748
2750- SwaggerHttp . prototype . execute = function ( obj ) {
2749+ SwaggerHttp . prototype . execute = function ( obj , opts ) {
27512750 if ( obj && ( typeof obj . useJQuery === 'boolean' ) )
27522751 this . useJQuery = obj . useJQuery ;
27532752 else
@@ -2758,9 +2757,9 @@ SwaggerHttp.prototype.execute = function(obj) {
27582757 }
27592758
27602759 if ( this . useJQuery )
2761- return new JQueryHttpClient ( ) . execute ( obj ) ;
2760+ return new JQueryHttpClient ( opts ) . execute ( obj ) ;
27622761 else
2763- return new ShredHttpClient ( ) . execute ( obj ) ;
2762+ return new ShredHttpClient ( opts ) . execute ( obj ) ;
27642763} ;
27652764
27662765SwaggerHttp . prototype . isIE8 = function ( ) {
@@ -2868,8 +2867,8 @@ JQueryHttpClient.prototype.execute = function(obj) {
28682867/*
28692868 * ShredHttpClient is a light-weight, node or browser HTTP client
28702869 */
2871- var ShredHttpClient = function ( options ) {
2872- this . options = ( options || { } ) ;
2870+ var ShredHttpClient = function ( opts ) {
2871+ this . opts = ( opts || { } ) ;
28732872 this . isInitialized = false ;
28742873
28752874 var identity , toString ;
@@ -2880,7 +2879,7 @@ var ShredHttpClient = function(options) {
28802879 }
28812880 else
28822881 this . Shred = require ( "shred" ) ;
2883- this . shred = new this . Shred ( options ) ;
2882+ this . shred = new this . Shred ( opts ) ;
28842883} ;
28852884
28862885ShredHttpClient . prototype . initShred = function ( ) {
0 commit comments