openapi-ts-json-schema
Version:
Generate TypeScript-first JSON schemas from OpenAPI definitions
7 lines (6 loc) • 425 B
TypeScript
/**
* Iterate any object (in reality a JSON schema) to replace inlined ref schema objects
* (marked with a SCHEMA_ID_SYMBOL property holding the original $ref value)
* with a string placeholder with a reference to their internal id ("_OTJS-START_/id/value_OTJS-END_")
*/
export declare function replaceInlinedRefsWithStringPlaceholder(schema: Record<string | symbol, unknown>): string | Record<string | symbol, unknown>;