File tree Expand file tree Collapse file tree
packages/openapi-code-generator/src/typescript Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,8 +134,10 @@ export class ClientOperationBuilder {
134134 }
135135
136136 queryString ( ) : string {
137+ const { parameters} = this . operation
138+
137139 // todo: consider style / explode / allowReserved etc here
138- return this . operation . parameters . query . list
140+ return parameters . query . list
139141 . map ( ( it ) => `'${ it . name } ': ${ this . paramName ( it . name ) } ` )
140142 . join ( ",\n" )
141143 }
@@ -145,7 +147,9 @@ export class ClientOperationBuilder {
145147 } : {
146148 nullContentTypeValue : "undefined" | "false"
147149 } ) : string {
148- const paramHeaders = this . operation . parameters . header . list . map (
150+ const { parameters} = this . operation
151+
152+ const paramHeaders = parameters . header . list . map (
149153 ( it ) => `'${ it . name } ': ${ this . paramName ( it . name ) } ` ,
150154 )
151155
@@ -172,7 +176,9 @@ export class ClientOperationBuilder {
172176 }
173177
174178 hasHeader ( name : string ) : boolean {
175- const parameter = this . operation . parameters . header . list . find (
179+ const { parameters} = this . operation
180+
181+ const parameter = parameters . header . list . find (
176182 ( it ) => it . name . toLowerCase ( ) === name . toLowerCase ( ) ,
177183 )
178184
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ export abstract class AbstractSchemaBuilder<
228228 // Note: for zod in particular it's desirable to use merge over intersection
229229 // where possible, as it returns a more malleable schema
230230 const isMergable = model . allOf
231- . map ( ( it ) => ( isRef ( it ) ? this . input . schema ( it ) : it ) )
231+ . map ( ( it ) => this . input . schema ( it ) )
232232 . every (
233233 ( it ) =>
234234 it . type === "object" &&
Original file line number Diff line number Diff line change @@ -280,9 +280,7 @@ export class TypeBuilder implements ICompilable {
280280 }
281281
282282 isEmptyObject ( schemaObject : MaybeIRModel ) : boolean {
283- const dereferenced = isRef ( schemaObject )
284- ? this . input . schema ( schemaObject )
285- : schemaObject
283+ const dereferenced = this . input . schema ( schemaObject )
286284
287285 return (
288286 dereferenced . type === "object" &&
You can’t perform that action at this time.
0 commit comments