import { O as OpenAPIDocument } from './types-Dzi0PpYX.cjs'; /** * A single spec-hygiene finding from {@link lintResolvedSpec}. * * Findings are reported, never fatal: the spec is structurally valid, the * shape just looks like an authoring mistake (declared but unused, * referenced but undeclared). * * @public */ interface SpecHygieneIssue { /** * - `"unused-component"`: a `components.{schemas,parameters,requestBodies,responses,headers,securitySchemes}` * entry that no operation reaches. * - `"unused-tag"`: a `tags[]` entry whose name doesn't appear in any * operation's `tags` array. * - `"unreachable-defs"`: a `$defs/` entry inside a schema that no * `$ref` in the same schema points to. * - `"path-param-undeclared"`: a `{name}` placeholder in a path template * with no matching `parameters: [{ in: "path", name }]` declaration on * the operation or its path-item. * - `"path-param-unused"`: a `parameters: [{ in: "path", name }]` * declaration whose name doesn't appear as a placeholder in the path * template. */ code: "unused-component" | "unused-tag" | "unreachable-defs" | "path-param-undeclared" | "path-param-unused"; /** RFC 6901 JSON Pointer to the offending node in the resolved document. */ pointer: string; /** Human-readable explanation. */ message: string; } /** * Lint a resolved OpenAPI document for spec-hygiene issues. * * Pure: the document is not mutated. Run after * {@link resolveSpec | resolveSpec} so external `$ref`s are inlined and * circular ones live under `$defs.__ext__/` (the lint skips * these resolver-inserted entries). * * The four checks: * * - **unused-component**: components defined but not reached from any * operation, security requirement, or `discriminator.mapping`. * - **unused-tag**: top-level `tags[]` entry with no operation referring to * it. * - **unreachable-defs**: per-schema `$defs/` that no sibling `$ref` * in the same schema points to. * - **path-param-undeclared / path-param-unused**: mismatch between the * `{name}` placeholders in a path template and the path-parameter * declarations on the operation + its path-item. * * @returns Findings, ordered by category then by pointer for stable * output. Empty array means clean spec. * * @public */ declare function lintResolvedSpec(document: OpenAPIDocument): SpecHygieneIssue[]; export { type SpecHygieneIssue as S, lintResolvedSpec as l };