Skip to content

Instantly share code, notes, and snippets.

@ca0v
Created November 14, 2014 14:30
Show Gist options
  • Save ca0v/c9504ef893015a7dce39 to your computer and use it in GitHub Desktop.
Save ca0v/c9504ef893015a7dce39 to your computer and use it in GitHub Desktop.
typescript definition for json schema
declare module 'interfaces/json-schema' {
interface IDependencyDescriptor {
[s: string]: string;
}
interface IPropertyDescriptor {
[s: string]: {
'$ref'?: string;
type?: string;
format?: string;
description?: string;
};
}
export interface IJsonSchema {
type: string;
properties: IPropertyDescriptor;
required?: Array<string>;
dependencies?: IDependencyDescriptor;
id?: string;
'$schema'?: string;
description?: string;
title?: string;
definitions?: any;
}
export interface IJsonSchemaModel {
[s: string]: IJsonSchema;
}
//export = IJsonSchema;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment