1 | import SchemaId from './schemaId';
|
2 | export declare type JsonSchema = JsonSchemaOrg.Draft04.Schema | JsonSchemaOrg.Draft07.Schema;
|
3 | export declare type JsonSchemaObject = JsonSchemaOrg.Draft04.Schema | JsonSchemaOrg.Draft07.SchemaObject;
|
4 | export declare type SchemaType = 'Draft04' | 'Draft07';
|
5 | export interface Schema {
|
6 | type: SchemaType;
|
7 | openApiVersion?: 2 | 3;
|
8 | id: SchemaId;
|
9 | content: JsonSchema;
|
10 | rootSchema?: Schema;
|
11 | }
|
12 | export interface NormalizedSchema extends Schema {
|
13 | content: JsonSchemaObject;
|
14 | }
|
15 | export declare function parseSchema(content: any, url?: string): Schema;
|
16 | export declare function getSubSchema(rootSchema: Schema, pointer: string, id?: SchemaId): Schema;
|
17 | export declare function getId(type: SchemaType, content: any): string | undefined;
|
18 | export declare function searchAllSubSchema(schema: Schema, onFoundSchema: (subSchema: Schema) => void, onFoundReference: (refId: SchemaId) => void): void;
|