/** * Pure helpers over the JSON-Schema subset: `$ref`/`$defs` resolution and the * small predicates the renderer, defaulting, and validation all share. Kept * side-effect-free so they can be unit-tested and reused across the module. */ import type { JsonSchema, JsonSchemaType } from './types'; /** * Resolve an internal `$ref` against the document root, following chained refs * (a `$ref` whose target is itself a `$ref`). Only same-document pointers are * supported (`#/$defs/Name`, `#/definitions/Name`, `#`); an external or * unresolvable ref throws LOUDLY rather than yielding a silent empty schema. * A schema with no `$ref` is returned unchanged. A pointer cycle throws. */ export declare function resolveRef(schema: JsonSchema, root: JsonSchema): JsonSchema; /** Does this schema describe the JSON `null` type (and nothing else)? */ export declare function isNullSchema(schema: JsonSchema): boolean; /** The list of type tokens a schema declares, normalized to an array. */ export declare function typeList(schema: JsonSchema): readonly JsonSchemaType[]; /** * The union member list from a schema, if it is a union. Pydantic emits * discriminated unions under `oneOf` and plain/null unions under `anyOf`; both * are treated as a union here. `allOf` is NOT a union (it is an intersection) * and is not returned. */ export declare function unionMembers(schema: JsonSchema): readonly JsonSchema[] | undefined; /** An option row derived from an `enum` or a discriminated variant tag. */ export interface EnumOption { readonly value: unknown; readonly label: string; } /** Render-facing label for an arbitrary JSON scalar used as an enum/const value. */ export declare function scalarLabel(value: unknown): string; /** * The single tag value a discriminated-union variant pins on the discriminator * property (Pydantic emits it as `const`, or a single-entry `enum`), or * `undefined` if the variant does not constrain that property to one value. */ export declare function variantTag(variant: JsonSchema, propertyName: string, root: JsonSchema): unknown; /** A human label for a union variant: its title, its tag, or a positional fallback. */ export declare function variantLabel(variant: JsonSchema, index: number, discriminatorTag: unknown, root: JsonSchema): string; //# sourceMappingURL=resolve.d.ts.map