@ -1,11 +1,12 @@
import { eBindingSourceId , eMethodModifier } from '../enums' ;
import { eBindingSourceId , eMethodModifier } from '../enums' ;
import { camel , camelizeHyphen } from '../utils/text' ;
import { camel , camelizeHyphen } from '../utils/text' ;
import { getParamName , getParamValueName } from '../utils/methods' ;
import { getParamName , getParamValueName , isDictionaryType } from '../utils/methods' ;
import { ParameterInBody } from './api-definition' ;
import { ParameterInBody } from './api-definition' ;
import { Property } from './model' ;
import { Property } from './model' ;
import { Omissible } from './util' ;
import { Omissible } from './util' ;
import { VOLO_REMOTE_STREAM_CONTENT } from '../constants' ;
import { VOLO_REMOTE_STREAM_CONTENT } from '../constants' ;
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires
const shouldQuote = require ( 'should-quote' ) ;
const shouldQuote = require ( 'should-quote' ) ;
export class Method {
export class Method {
@ -40,6 +41,7 @@ export class Body {
body? : string ;
body? : string ;
method : string ;
method : string ;
params : string [ ] = [ ] ;
params : string [ ] = [ ] ;
dictParamVar? : string ;
responseTypeWithNamespace : string ;
responseTypeWithNamespace : string ;
requestType = 'any' ;
requestType = 'any' ;
responseType : string ;
responseType : string ;
@ -57,6 +59,10 @@ export class Body {
switch ( bindingSourceId ) {
switch ( bindingSourceId ) {
case eBindingSourceId . Model :
case eBindingSourceId . Model :
case eBindingSourceId . Query :
case eBindingSourceId . Query :
if ( isDictionaryType ( param . type , param . typeSimple ) ) {
this . dictParamVar = value ;
break ;
}
this . params . push ( paramName === value ? value : ` ${ getParamName ( paramName ) } : ${ value } ` ) ;
this . params . push ( paramName === value ? value : ` ${ getParamName ( paramName ) } : ${ value } ` ) ;
break ;
break ;
case eBindingSourceId . FormFile :
case eBindingSourceId . FormFile :