UNPKG

@danstackme/apity

Version:

Type-safe API client generator for React applications with file-based routing and runtime validation

16 lines (13 loc) 939 B
#!/usr/bin/env node import { OpenAPIV3 } from 'openapi-types'; interface GenerateOptions { outDir?: string; } declare function convertToOpenAPI3(doc: any): Promise<OpenAPIV3.Document>; declare function isReferenceObject(obj: any): obj is OpenAPIV3.ReferenceObject; declare function getRefName(ref: string): string; declare function resolveRef(ref: string, spec: OpenAPIV3.Document): OpenAPIV3.SchemaObject | undefined; declare function processSchemaDefinitions(spec: OpenAPIV3.Document): Map<string, OpenAPIV3.SchemaObject>; declare function generateRoutes(spec: OpenAPIV3.Document, options: GenerateOptions): Promise<void>; declare function generateSingleFile(routes: Map<string, Record<string, any>>, schemas: Map<string, OpenAPIV3.SchemaObject>, outDir: string, baseUrl: string): Promise<void>; export { convertToOpenAPI3, generateRoutes, generateSingleFile, getRefName, isReferenceObject, processSchemaDefinitions, resolveRef };