File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import tokenApi from './tokenApi.json'
66
77export const API_IDS = [ 'tokenApi' ] as const
88
9- export const APIS = {
9+ export const APIS : Record < ApiId , ApiConfig > = {
1010 tokenApi : {
1111 name : 'Token API' ,
1212 // url: 'https://token-api.thegraph.com/openapi', // production
@@ -39,7 +39,7 @@ export const APIS = {
3939 } ,
4040 } ,
4141 } ,
42- } satisfies Record < ApiId , ApiConfig >
42+ }
4343
4444export type ApiId = ( typeof API_IDS ) [ number ]
4545
@@ -142,9 +142,7 @@ export function getApi(apiId: ApiId, passedDocument?: OpenAPIV3_1.Document): Api
142142 if ( typeof documentOperation !== 'object' || ! ( 'tags' in documentOperation ) || ! documentOperation . tags ) continue
143143
144144 // Get the section name and path from the tags
145- const sectionName = documentOperation . tags . find ( ( tag ) => tag in config . sections ) as
146- | keyof typeof config . sections
147- | undefined
145+ const sectionName = documentOperation . tags . find ( ( tag ) => tag in config . sections )
148146 const section = sectionName ? config . sections [ sectionName ] : undefined
149147 if ( ! sectionName || ! section || ! ( 'operationId' in documentOperation ) || ! documentOperation . operationId ) {
150148 continue
You can’t perform that action at this time.
0 commit comments