/**
 * File format utilities for OpenAPI documents
 * Supports JSON and YAML formats with automatic detection
 */
export type FileFormat = "json" | "yaml";
/**
 * Detect file format from extension
 * Returns null if extension is unknown or missing
 */
export declare function detectFormatFromExtension(filePath: string): FileFormat | null;
/**
 * Detect format from content by trying to parse as both JSON and YAML
 * Tries JSON first as it's faster to validate
 */
export declare function detectFormatFromContent(content: string): FileFormat;
/**
 * Parse content with a known format
 */
export declare function parseContent(content: string, format: FileFormat): any;
/**
 * Parse content with flexible format detection
 * If format is provided, uses that. Otherwise attempts to detect from content.
 */
export declare function parseFlexible(content: string, knownFormat?: FileFormat): {
    document: any;
    detectedFormat: FileFormat;
};
/**
 * Serialize document to string based on format
 */
export declare function serializeContent(document: any, format: FileFormat): string;
/**
 * Parse file content with automatic format detection from extension
 * Falls back to trying both formats if extension is unknown
 */
export declare function parseFile(content: string, filePath: string): {
    document: any;
    detectedFormat: FileFormat;
};
/**
 * Result of converting a document between formats
 */
export interface ConversionResult {
    content: string;
    format: FileFormat;
}
/**
 * Convert document from one format to another
 * @param content The input content as a string
 * @param inputFormat The format of the input content
 * @param outputFormat The desired output format
 * @returns The converted content
 */
export declare function convertDocument(content: string, inputFormat: FileFormat, outputFormat: FileFormat): ConversionResult;
/**
 * Generate output file path by replacing the extension
 */
export declare function generateOutputPath(inputPath: string, outputFormat: FileFormat): string;
//# sourceMappingURL=file-format.d.ts.map