UNPKG

openapi-ts-json-schema

Version:

Generate TypeScript-first JSON schemas from OpenAPI definitions

12 lines (11 loc) 590 B
import type { OpenApiDocument } from '../types.js'; /** * Traverse the openAPI schema tree an brutally try to convert every oas definition * to JSON schema. We are probably overdoing since we process any found object. * * - Is there a way to tell an OpenAPI definition objects convertible to JSON schema from the others? * - Could we explicitly convert only the properties that need it? * * @TODO Find a nicer way to convert convert all the expected OpenAPI schemas */ export declare function convertOpenApiDocumentDefinitionsToJsonSchema(schema: OpenApiDocument): OpenApiDocument;