vitepress-openapi
Version:
Generate VitePress API Documentation from OpenAPI Specification.
16 lines (15 loc) • 786 B
TypeScript
import type { JSONSchema } from '@trojs/openapi-dereference';
export declare const originSymbol: unique symbol;
/**
* Resolve a JSON Pointer against the provided schema.
* The implementation mirrors the one from @trojs/openapi-dereference but is
* inlined here so we can tweak dereferencing behaviour.
* Results are cached per schema for performance.
*/
export declare function resolveRefSync(schema: JSONSchema, ref: string): unknown;
export declare function klona(val: any): any;
/**
* Dereference the given schema while merging JSON-schema annotations that appear next to a $ref node.
* Circular references are preserved via the originSymbol so downstream code can still detect them.
*/
export declare function dereferenceWithAnnotationsSync(schema: JSONSchema): JSONSchema;