UNPKG

yaml-to-json-schema

Version:

Generate json schema from yaml (swagger, openapi, asyncapi)

45 lines (44 loc) 893 B
export declare type Key = string; export declare type Src = string; export declare type File = string; export declare type Ref = string; export interface Keys<Src, Key> { [key: string]: Key; } export interface ParseOptions { input: string; } export interface Definitions { [key: string]: Prop; } export interface Properties { [key: string]: Prop; } export interface JsonSchema { type: string; definitions: Definitions; properties: Properties; } export interface RefObject { $ref: Ref; } export interface Addon { allOf: Prop[]; oneOf: Prop[]; anyOf: Prop[]; not: Prop; } export interface Items { items: Prop; } export interface Prop extends RefObject, Items, JsonSchema, Addon { } export interface Schemas { [key: string]: Prop; } export interface Components { schemas: Schemas; } export interface Doc { components: Components; }