wrekenfile-converter
Version:
Convert OpenAPI and Postman specs into Wrekenfiles, with chunking for vector database storage
40 lines • 1.62 kB
TypeScript
/**
* Conversion quality metrics for Wrekenfile generation.
* Analyzes a generated Wrekenfile object and reports statistics
* so users understand what was converted and what was lost.
*/
export interface ConversionStats {
/** Total number of methods/endpoints converted */
methodCount: number;
/** Methods with at least one RETURNS entry (non-void) */
methodsWithReturns: number;
/** Methods with no RETURNS (void responses) */
methodsWithVoidReturns: number;
/** Methods with ERRORS defined */
methodsWithErrors: number;
/** Total structs defined */
structCount: number;
/** Structs pruned by filterStructsByUsage (if tracked) */
structsPruned: number;
/** Methods using each HTTP method */
httpMethodCounts: Record<string, number>;
/** Methods with auth headers */
methodsWithAuth: number;
/** Methods with INPUTS */
methodsWithInputs: number;
/** Warnings about potential issues */
warnings: string[];
}
/**
* Compute conversion stats from a parsed Wrekenfile object.
* Call this after generating the wrekenfile but before serializing to YAML.
*
* @param wrekenfile - The wrekenfile object (with VERSION, METHODS, STRUCTS, etc.)
* @param preFilterStructCount - Number of structs before filterStructsByUsage (optional)
*/
export declare function computeConversionStats(wrekenfile: any, preFilterStructCount?: number): ConversionStats;
/**
* Format conversion stats as a human-readable summary string.
*/
export declare function formatConversionStats(stats: ConversionStats): string;
//# sourceMappingURL=conversion-stats.d.ts.map