@@ -25,9 +25,18 @@ export async function processOpenApiDocument(
2525 tags ?: string [ ] | undefined ,
2626) : Promise < void > {
2727 const refs = await $RefParser . default . resolve ( schema ) ;
28- // const schema = (await $RefParser.default.dereference(
29- // rawSchema,
30- // )) as OpenAPIV3.Document;
28+
29+ entryFile . addImportDeclaration ( {
30+ namedImports : [ 'RequestMethodCaller' ] ,
31+ moduleSpecifier : '@block65/rest-client' ,
32+ isTypeOnly : true ,
33+ } ) ;
34+
35+ entryFile . addImportDeclaration ( {
36+ namedImports : [ 'Simplify' ] ,
37+ moduleSpecifier : 'type-fest' ,
38+ isTypeOnly : true ,
39+ } ) ;
3140
3241 const typesModuleSpecifier =
3342 `./${ typesFile . getBaseNameWithoutExtension ( ) } .js` ||
@@ -59,18 +68,6 @@ export async function processOpenApiDocument(
5968 }
6069 } ;
6170
62- entryFile . addImportDeclaration ( {
63- namedImports : [ 'Simplify' ] ,
64- moduleSpecifier : 'type-fest' ,
65- isTypeOnly : true ,
66- } ) ;
67-
68- entryFile . addImportDeclaration ( {
69- namedImports : [ 'RequestMethodCaller' ] ,
70- moduleSpecifier : '@block65/rest-client' ,
71- isTypeOnly : true ,
72- } ) ;
73-
7471 const typesAndInterfaces = new Map <
7572 string ,
7673 InterfaceDeclaration | TypeAliasDeclaration
0 commit comments