@@ -423,16 +423,23 @@ describe('params.translator', () => {
423423 } ;
424424
425425 it . each ( [
426- { oasStyle : 'pipes' , expected : { style : HttpParamStyles . PipeDelimited } } ,
427- { oasStyle : 'ssv' , expected : { style : HttpParamStyles . SpaceDelimited } } ,
428- { oasStyle : 'csv' , expected : { style : HttpParamStyles . CommaDelimited } } ,
429- { oasStyle : 'tsv' , expected : { style : HttpParamStyles . TabDelimited } } ,
430- { oasStyle : 'pipes' , expected : { style : HttpParamStyles . PipeDelimited } } ,
431- { oasStyle : 'multi' , expected : { style : HttpParamStyles . Form , explode : true } } ,
432- { oasStyle : 'invalidStyleValue' , expected : { style : HttpParamStyles . CommaDelimited } } ,
433- ] ) ( 'translate style: %o' , ( { oasStyle, expected } ) => {
426+ { type : 'string' , oasStyle : 'pipes' , expected : { style : HttpParamStyles . Unspecified } } ,
427+ { type : 'string' , oasStyle : 'ssv' , expected : { style : HttpParamStyles . Unspecified } } ,
428+ { type : 'string' , oasStyle : 'csv' , expected : { style : HttpParamStyles . Unspecified } } ,
429+ { type : 'string' , oasStyle : 'tsv' , expected : { style : HttpParamStyles . Unspecified } } ,
430+ { type : 'string' , oasStyle : 'pipes' , expected : { style : HttpParamStyles . Unspecified } } ,
431+ { type : 'string' , oasStyle : 'multi' , expected : { style : HttpParamStyles . Unspecified } } ,
432+ { type : 'string' , oasStyle : 'invalidStyleValue' , expected : { style : HttpParamStyles . Unspecified } } ,
433+ { type : 'array' , oasStyle : 'pipes' , expected : { style : HttpParamStyles . PipeDelimited } } ,
434+ { type : 'array' , oasStyle : 'ssv' , expected : { style : HttpParamStyles . SpaceDelimited } } ,
435+ { type : 'array' , oasStyle : 'csv' , expected : { style : HttpParamStyles . CommaDelimited } } ,
436+ { type : 'array' , oasStyle : 'tsv' , expected : { style : HttpParamStyles . TabDelimited } } ,
437+ { type : 'array' , oasStyle : 'pipes' , expected : { style : HttpParamStyles . PipeDelimited } } ,
438+ { type : 'array' , oasStyle : 'multi' , expected : { style : HttpParamStyles . Form , explode : true } } ,
439+ { type : 'array' , oasStyle : 'invalidStyleValue' , expected : { style : HttpParamStyles . CommaDelimited } } ,
440+ ] ) ( 'translate style: %o' , ( { type, oasStyle, expected } ) => {
434441 expect (
435- translateToQueryParameter ( { } , { ...parameter , collectionFormat : oasStyle } as QueryParameter ) ,
442+ translateToQueryParameter ( { } , { ...parameter , type , collectionFormat : oasStyle } as QueryParameter ) ,
436443 ) . toMatchObject ( expected ) ;
437444 } ) ;
438445
0 commit comments