/** * SpecialOpenApi — Deduplicates `components/schemas` entries in an OpenAPI spec * and applies JSON Schema post-processing (null removal, allOf flattening). * * When `OpenApi.fromApi` generates the spec, different AST nodes sharing the * same identifier can produce duplicate entries (e.g. "X" and "X1") in * `components.schemas`. This module provides a transform function that * collapses those duplicates, rewrites all `$ref` pointers accordingly, * and post-processes schemas for better codegen compatibility. * * Usage with the OpenApi `Transform` annotation: * * ```ts * import { OpenApi } from "effect/unstable" * import { deduplicateOpenApiSchemas } from "./SpecialOpenApi.js" * * const api = HttpApi.make("myApi") * .pipe(HttpApi.annotateContext(OpenApi.annotations({ transform: deduplicateOpenApiSchemas }))) * ``` */ /** * Deduplicates `components.schemas` entries in an OpenAPI spec. * * Entries sharing the same base identifier (e.g. "X" and "X1") whose JSON * representations are identical are collapsed into a single canonical entry, * and all `$ref` pointers throughout the spec are rewritten to point to * the canonical key. * * Designed to be used as the `transform` option in `OpenApi.annotations`. */ export declare function deduplicateOpenApiSchemas(spec: Record): Record; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU3BlY2lhbE9wZW5BcGkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9TY2hlbWEvU3BlY2lhbE9wZW5BcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FtQkc7QUFJSDs7Ozs7Ozs7O0dBU0c7QUFDSCx3QkFBZ0IseUJBQXlCLENBQ3ZDLElBQUksRUFBRSxNQUFNLENBQUMsTUFBTSxFQUFFLEdBQUcsQ0FBQyxHQUN4QixNQUFNLENBQUMsTUFBTSxFQUFFLEdBQUcsQ0FBQyxDQXFEckIifQ==