wrekenfile-converter
Version:
Convert OpenAPI and Postman specs into Wrekenfiles, with chunking for vector database storage
25 lines • 1.03 kB
TypeScript
/**
* Deterministic canonical method ID generation.
* Format: <namespace>.<resource>.<action>
* No HTTP method or path params in name; semantic only.
*/
/**
* Compute base canonical ID from HTTP method and path. Deterministic; no collision handling.
* Enforces grammar: <namespace>.<resource>[.<subresource>].<action>
*/
export declare function computeCanonicalId(libraryName: string, httpMethod: string, path: string): string;
export interface MethodCanonicalInput {
methodId: string;
httpMethod?: string;
endpoint?: string;
existingCanonicalId?: string;
}
/**
* Resolve canonical IDs for all methods with collision handling:
* 1. Use existing CANONICAL_ID if provided.
* 2. Else compute base ID from HTTP + path.
* 3. On collision: extend with next path segment (subresource).
* 4. If still colliding: append short deterministic hash.
*/
export declare function resolveCanonicalIds(methods: MethodCanonicalInput[], libraryName: string): Map<string, string>;
//# sourceMappingURL=canonical-id.d.ts.map