Conversion functions between core-types and JSON Schema/OpenAPI. Current version 2.2.0. Part of the typeconv ecosystem, this library is typically used indirectly via typeconv, which provides CLI and programmatic conversion between TypeScript, JSON Schema, GraphQL, and OpenAPI. It offers four main functions: convertCoreTypesToJsonSchema, convertJsonSchemaToCoreTypes, convertCoreTypesToOpenApi, and convertOpenApiTpCoreTypes (note the typo in the function name). All return wrapped ConversionResult values. Requires Node >=14.13.1 or >=16.0.0. Ships TypeScript types. Not intended for direct use; prefer typeconv for end-user conversion tasks.
npm install core-types-json-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates converting a core-types document to JSON Schema using the primary export function.
Use the exact function name as exported: convertOpenApiTpCoreTypes (with 'Tp').
Install core-types: npm install core-types
Use typeconv CLI or programmatic API instead for end-user conversion.
Check core-types documentation for ConversionResult type. Ensure you handle the wrapped result.
Use named import: import { convertCoreTypesToJsonSchema } from 'core-types-json-schema'Run: npm install core-types-json-schema core-types
Use: import { convertOpenApiTpCoreTypes } from 'core-types-json-schema'