-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
59 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,143 +1,11 @@ | ||
import { JSONValue, JSONObject, JSONArray } from './json.d' | ||
// WARNING - this file is deprecated. you should import from `@types/json-schema` directly. | ||
|
||
/** | ||
* A single JSON Schema. | ||
*/ | ||
export type JSONSchema = JSONSchemaObject|boolean | ||
|
||
/** | ||
* A JSON Schema, if that schema is an object (not a boolean). | ||
*/ | ||
export interface JSONSchemaObject extends JSONObject { | ||
$comment?: string; | ||
/** | ||
* @format 'uri-reference' | ||
*/ | ||
$id?: string; | ||
/** | ||
* @format 'uri-reference' | ||
*/ | ||
$ref?: string; | ||
/** | ||
* @format 'uri' | ||
*/ | ||
$schema?: string; | ||
additionalItems?: JSONSchema; | ||
additionalProperties?: JSONSchema; | ||
allOf?: schemaArray; | ||
anyOf?: schemaArray; | ||
const?: JSONValue; | ||
contains?: JSONSchema; | ||
contentEncoding?: string; | ||
contentMediaType?: string; | ||
default?: JSONValue; | ||
/** | ||
* @default {} | ||
*/ | ||
definitions?: { | ||
[key: string]: JSONSchema; | ||
}; | ||
dependencies?: { | ||
[key: string]: JSONSchema|stringArray; | ||
}, | ||
description?: string; | ||
else?: JSONSchema; | ||
/** | ||
* @minItems 1 | ||
* @uniqueItems true | ||
*/ | ||
enum?: JSONArray; | ||
examples?: JSONArray; | ||
exclusiveMaximum?: number; | ||
exclusiveMinimum?: number; | ||
format?: string; | ||
if?: JSONSchema; | ||
/** | ||
* @default true | ||
*/ | ||
items?: JSONSchema|schemaArray; | ||
maximum?: number; | ||
maxItems?: nonNegativeInteger; | ||
maxLength?: nonNegativeInteger; | ||
maxProperties?: nonNegativeInteger; | ||
minimum?: number; | ||
minItems?: nonNegativeIntegerDefault0; | ||
minLength?: nonNegativeIntegerDefault0; | ||
minProperties?: nonNegativeIntegerDefault0; | ||
/** | ||
* @exclusiveMinimum 0 | ||
*/ | ||
multipleOf?: number; | ||
not?: JSONSchema; | ||
oneOf?: schemaArray; | ||
/** | ||
* @format regex | ||
*/ | ||
pattern?: string; | ||
/** | ||
* @default {} | ||
*/ | ||
patternProperties?: { | ||
[ | ||
/** | ||
* @format regex | ||
*/ | ||
key: string | ||
]: JSONSchema; | ||
}, | ||
/** | ||
* @default {} | ||
*/ | ||
properties?: { | ||
[key: string]: JSONSchema; | ||
}; | ||
propertyNames?: JSONSchema; | ||
/** | ||
* @default false | ||
*/ | ||
readOnly?: boolean; | ||
required?: stringArray; | ||
then?: JSONSchema; | ||
title?: string; | ||
/** | ||
* @minItems 1 | ||
* @uniqueItems true | ||
*/ | ||
type?: simpleTypes[]|simpleTypes; | ||
/** | ||
* @default false | ||
*/ | ||
uniqueItems?: boolean; | ||
} | ||
|
||
/** | ||
* @minItems 1 | ||
*/ | ||
type schemaArray = JSONSchema[] | ||
|
||
|
||
/** | ||
* @type integer | ||
*/ | ||
type integer = number | ||
import { JSONSchema7Definition, JSONSchema7 } from 'json-schema' | ||
|
||
/** | ||
* @type integer | ||
* @minimum 0 | ||
*/ | ||
type nonNegativeInteger = integer | ||
|
||
/** | ||
* @type integer | ||
* @minimum 0 | ||
* @default 0 | ||
*/ | ||
type nonNegativeIntegerDefault0 = integer | ||
|
||
type simpleTypes = 'array'|'boolean'|'integer'|'null'|'number'|'object'|'string' | ||
|
||
/** | ||
* @uniqueItems true | ||
* @default [] | ||
*/ | ||
type stringArray = string[] | ||
export { | ||
JSONSchema7Definition, | ||
JSONSchema7, | ||
JSONSchema7Definition as JSONSchema, // WARNING{DEPRECATED} | ||
JSONSchema7 as JSONSchemaObject, // WARNING{DEPRECATED} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters