@@ -164,8 +164,7 @@ export const createSdk = <Client extends ClientInstance>(client: Client, options
164164 ? `${ createTypeBaseName ( id ) } QueryParams`
165165 : undefined ;
166166
167- const QueryParamsGeneric =
168- QueryParams && queryParamsRequired === false ? `${ QueryParams } | undefined` : QueryParams ;
167+ const QueryParamsGeneric = QueryParams && ! queryParamsRequired ? `${ QueryParams } | undefined` : QueryParams ;
169168
170169 return `Request<${ Response } , ${ Payload } , ${ QueryParamsGeneric } , ${ LocalError } , "${ endpoint } ", Client>` ;
171170 }
@@ -208,7 +207,7 @@ export const createSdk = <Client extends ClientInstance>(client: Client, options
208207 addToGenericType ( "error" , LocalError ) ;
209208 }
210209 if ( QueryParams ) {
211- const key = queryParamsRequired === false ? "queryParams?" : "queryParams" ;
210+ const key = ! queryParamsRequired ? "queryParams?" : "queryParams" ;
212211 addToGenericType ( key , QueryParams ) ;
213212 }
214213
@@ -289,13 +288,10 @@ export const createSdk = <Client extends ClientInstance>(client: Client, options
289288 const responseType = ! lodash . isEmpty ( responseTypePaths ) ? responseTypePaths . join ( " | " ) : "any" ;
290289 const errorType = ! lodash . isEmpty ( errorTypePaths ) ? errorTypePaths . join ( " | " ) : "undefined" ;
291290 const queryParamsRequired = Array . isArray ( operation . parameters )
292- ? operation . parameters . every ( ( p ) => {
293- if ( "in" in p && p . in === "query" && p . required === false ) {
294- return true ;
295- }
296- return false ;
291+ ? operation . parameters . some ( ( p ) => {
292+ return "in" in p && p . in === "query" && p . required === true ;
297293 } )
298- : undefined ;
294+ : false ;
299295
300296 return {
301297 id : normalizedOperationId ,
0 commit comments