@@ -111,7 +111,7 @@ export class OpenAPIGenerator {
111111
112112 const errors : string [ ] = [ ]
113113
114- await walkProcedureContractsAsync ( router , async ( contract , path ) => {
114+ await walkProcedureContractsAsync ( router , ( contract , path ) => {
115115 if ( value ( options . filter , contract , path ) === false ) {
116116 return
117117 }
@@ -140,9 +140,9 @@ export class OpenAPIGenerator {
140140 tags : meta ?. tags ?. map ( tag => tag ) ,
141141 }
142142
143- await this . request ( doc , operationRef , def , meta , dynamicPathParams , options , path )
144- await this . successResponse ( doc , operationRef , def , meta , options , path )
145- await this . errorResponse ( doc , operationRef , def , meta , options )
143+ this . request ( doc , operationRef , def , meta , dynamicPathParams , options , path )
144+ this . successResponse ( doc , operationRef , def , meta , options , path )
145+ this . errorResponse ( doc , operationRef , def , meta , options )
146146 }
147147
148148 if ( typeof meta ?. spec === 'function' ) {
@@ -172,17 +172,17 @@ export class OpenAPIGenerator {
172172 return this . serializer . serialize ( doc , { asFormData : false , useFormDataForBlobFields : false } ) as OpenAPIDocument
173173 }
174174
175- private async convertSchema ( schema : AnySchema | undefined , direction : JsonSchemaConverterDirection ) : Promise < [ JsonSchema , boolean ] > {
176- const [ jsonSchema , optional ] = await this . converter . convert ( schema as any , direction )
175+ private convertSchema ( schema : AnySchema | undefined , direction : JsonSchemaConverterDirection ) : [ JsonSchema , boolean ] {
176+ const [ jsonSchema , optional ] = this . converter . convert ( schema as any , direction )
177177 return [ strip$schemaField ( jsonSchema ) , optional ]
178178 }
179179
180- private async convertSchemas ( schemas : AnySchema [ ] | undefined , direction : JsonSchemaConverterDirection ) : Promise < [ JsonSchema , boolean ] > {
180+ private convertSchemas ( schemas : AnySchema [ ] | undefined , direction : JsonSchemaConverterDirection ) : [ JsonSchema , boolean ] {
181181 if ( ! schemas || schemas . length <= 1 ) {
182182 return this . convertSchema ( schemas ?. [ 0 ] , direction )
183183 }
184184
185- const results = await Promise . all ( schemas . map ( s => this . convertSchema ( s , direction ) ) )
185+ const results = schemas . map ( s => this . convertSchema ( s , direction ) )
186186 const allOfSchemas : JsonSchema [ ] = [ ]
187187 let optional = true
188188
@@ -196,15 +196,15 @@ export class OpenAPIGenerator {
196196 return [ combineJsonSchemasWithComposition ( 'allOf' , allOfSchemas ) , optional ]
197197 }
198198
199- private async request (
199+ private request (
200200 doc : OpenAPIDocument ,
201201 ref : OpenAPIOperationObject ,
202202 def : AnyProcedureContract [ '~orpc' ] ,
203203 meta : OpenAPIMeta | undefined ,
204204 dynamicPathParams : DynamicPathParam [ ] | undefined ,
205205 options : OpenAPIGeneratorGenerateOptions ,
206206 path : string [ ] ,
207- ) : Promise < void > {
207+ ) : void {
208208 const method = meta ?. method ?? DEFAULT_OPENAPI_METHOD
209209 const inputStructure = meta ?. inputStructure ?? DEFAULT_OPENAPI_INPUT_STRUCTURE
210210 const inputSchemas = def . inputSchemas
@@ -214,8 +214,8 @@ export class OpenAPIGenerator {
214214
215215 if ( asyncIteratorObjectDetails ) {
216216 const [ yieldSchemas , returnSchemas ] = asyncIteratorObjectDetails
217- const yieldResult = await this . convertSchemas ( yieldSchemas , 'input' )
218- const returnResult = await this . convertSchemas ( returnSchemas , 'input' )
217+ const yieldResult = this . convertSchemas ( yieldSchemas , 'input' )
218+ const returnResult = this . convertSchemas ( returnSchemas , 'input' )
219219
220220 ref . requestBody = {
221221 required : true ,
@@ -228,7 +228,7 @@ export class OpenAPIGenerator {
228228
229229 const dynamicParams = dynamicPathParams ?. map ( v => v . parameterName )
230230
231- const [ schema , optional ] = await this . convertSchemas ( inputSchemas , 'input' )
231+ const [ schema , optional ] = this . convertSchemas ( inputSchemas , 'input' )
232232
233233 if ( isUnconstrainedSchema ( schema ) && ! dynamicParams ?. length ) {
234234 return
@@ -374,14 +374,14 @@ export class OpenAPIGenerator {
374374 }
375375 }
376376
377- private async successResponse (
377+ private successResponse (
378378 doc : OpenAPIDocument ,
379379 ref : OpenAPIOperationObject ,
380380 def : AnyProcedureContract [ '~orpc' ] ,
381381 meta : OpenAPIMeta | undefined ,
382382 options : OpenAPIGeneratorGenerateOptions ,
383383 path : string [ ] ,
384- ) : Promise < void > {
384+ ) : void {
385385 const outputSchemas = def . outputSchemas
386386 const status = meta ?. successStatus ?? DEFAULT_SUCCESS_STATUS
387387 const description = meta ?. successDescription ?? DEFAULT_OPENAPI_SUCCESS_DESCRIPTION
@@ -392,8 +392,8 @@ export class OpenAPIGenerator {
392392
393393 if ( iteratorDetails ) {
394394 const [ yieldSchemas , returnSchemas ] = iteratorDetails
395- const yieldResult = await this . convertSchemas ( yieldSchemas , 'output' )
396- const returnResult = await this . convertSchemas ( returnSchemas , 'output' )
395+ const yieldResult = this . convertSchemas ( yieldSchemas , 'output' )
396+ const returnResult = this . convertSchemas ( returnSchemas , 'output' )
397397
398398 ref . responses ??= { }
399399 ref . responses [ status ] = {
@@ -405,7 +405,7 @@ export class OpenAPIGenerator {
405405 }
406406 }
407407
408- const [ schema ] = await this . convertSchemas ( outputSchemas , 'output' )
408+ const [ schema ] = this . convertSchemas ( outputSchemas , 'output' )
409409
410410 if ( isUnconstrainedSchema ( schema ) || outputStructure === 'compact' ) {
411411 ref . responses ??= { }
@@ -481,13 +481,13 @@ export class OpenAPIGenerator {
481481 }
482482 }
483483
484- private async errorResponse (
484+ private errorResponse (
485485 doc : OpenAPIDocument ,
486486 ref : OpenAPIOperationObject ,
487487 def : AnyProcedureContract [ '~orpc' ] ,
488488 meta : OpenAPIMeta | undefined ,
489489 options : OpenAPIGeneratorGenerateOptions ,
490- ) : Promise < void > {
490+ ) : void {
491491 const errorStatusMap : Record < string , number > = options . errorStatusMap ?? COMMON_ERROR_STATUS_MAP
492492 const errorMap : ErrorMap = def . errorMap
493493
@@ -504,7 +504,7 @@ export class OpenAPIGenerator {
504504
505505 const status = errorStatusMap [ code ] ?? DEFAULT_ERROR_STATUS
506506 const defaultMessage = config . message
507- const [ dataJsonSchema , dataOptional ] = await this . convertSchema ( config . data , 'output' )
507+ const [ dataJsonSchema , dataOptional ] = this . convertSchema ( config . data , 'output' )
508508
509509 const definitions = errorDefinitionsByStatus . get ( status )
510510 if ( definitions ) {
0 commit comments