/** OpenAPI servers[0].url 的 path 部分;仅用于规范自身 path 归一化,不分析实现语言。 */ export declare function extractServerBasePath(document: unknown): string; /** 解析 OpenAPI 契约自身的 METHOD path 集合,供契约、切片与 CRUD 声明交叉检查。 */ export declare function parseOpenapiOperations(content: string): Set; export declare function parseOpenapiPathMap(content: string): Map>; export declare function countOpenapiOperations(content: string): number; export interface OpenapiField { /** 规范化路径键:`[location.]path`,如 `req.items[].sku_id`、`resp.amount.total`、`query.status`、`header.Idempotency-Key`。 * location 前缀区分 request/response/parameters,避免 `request.id` 与 `response.id` 被裸名 dedup 合并。 */ name: string; type?: string; required?: boolean; enumValues?: string[]; /** oneOf/anyOf 并集扁平产生的字段标记(供调用方区分合并来源)。 */ oneOfMerged?: boolean; } /** 解析 OpenAPI 各 operation 的字段 schema(供 companion_consistency 字段级一致性)。 * 按 operation 的 x-soloforge-endpoint-id 关联 DD-A;展开 $ref + 归并 allOf + required + enum; * 递归 array items(items[].)与嵌套 object(a.b);读 parameters 按 in(path./query./header.); * requestBody→req.、responses→resp. 前缀。字段 name 存规范化路径键,与 md 侧同键比对。 * 无 endpoint-id 的 operation 用 METHOD path 作 key。 */ export declare function parseOpenapiOperationSchemas(content: string): Map;