import type { OpenAPIV3 } from 'openapi-types'; import type { SchemaNaming } from '../openapi-types'; import type { ParserOptions } from './options'; /** * Convenience function to invoke the creation of the OpenApiDocumentRefs builder. * @param document - The original OpenAPI document. * @param options - Parser options. * @returns A promise to the reference representation. * @internal */ export declare function createRefs(document: OpenAPIV3.Document, options: ParserOptions): Promise; /** * Representation of cross references within a document. * Useful when resolving references or getting schema names for referenced schemas. * @internal */ export declare class OpenApiDocumentRefs { private refs; private schemaRefMapping; /** * Create a representation of references within a document. * @param document - The original OpenAPI document. * @param options - Parser options. * @returns A promise to the reference representation. */ static createRefs(document: OpenAPIV3.Document, options: ParserOptions): Promise; /** * Parse mapping between schema references and their unique names. * @param document - The original OpenAPI document. * @param options - Parser options. * @returns A mapping from schema references to schema naming objects. */ private static parseSchemaRefMapping; /** * Creates a new instance of `OpenApiDocumentRefs`. * @param refs - Object representing the OpenAPI cross references. * @param schemaRefMapping - Mapping between schema references and schema naming. */ private constructor(); /** * Check whether the given object is a reference object and resolve if necessary. * This operates only on the current level and does not resolve the object recursively. * @param obj - Object to resolve if necessary. * @returns A resolved object. */ resolveObject(obj: T | OpenAPIV3.ReferenceObject): T; /** * Parse the type name of a reference object. * @param obj - Reference object or reference path to get the type name from. * @returns Parsed type name. */ getSchemaNaming(obj: OpenAPIV3.ReferenceObject | string): SchemaNaming; }