UNPKG

openapi-ts-json-schema

Version:

OpenAPI to JSON schema generator with TypeScript in mind

12 lines (11 loc) 572 B
import type { OpenApiSchema } from '../types'; /** * 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 convertOpenApiToJsonSchema(schema: OpenApiSchema): Record<string, unknown>;