mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #32717 from chharvey/fix32249
[json-schema] allow `$schema` property to be string
This commit is contained in:
Vendored
+38
-10
@@ -20,6 +20,21 @@ export type JSONSchema4TypeName = 'string' | 'number' | 'integer' | 'boolean'
|
||||
*/
|
||||
export type JSONSchema4Type = any[] | boolean | number | null | object | string
|
||||
|
||||
/**
|
||||
* Meta schema
|
||||
*
|
||||
* Recommended values:
|
||||
* - 'http://json-schema.org/schema#'
|
||||
* - 'http://json-schema.org/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-04/schema#'
|
||||
* - 'http://json-schema.org/draft-04/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-03/schema#'
|
||||
* - 'http://json-schema.org/draft-03/hyper-schema#'
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
||||
*/
|
||||
export type JSONSchema4Version = string;
|
||||
|
||||
/**
|
||||
* JSON Schema V4
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04
|
||||
@@ -27,10 +42,7 @@ export type JSONSchema4Type = any[] | boolean | number | null | object | string
|
||||
export interface JSONSchema4 {
|
||||
id?: string
|
||||
$ref?: string
|
||||
$schema?: 'http://json-schema.org/schema#' | 'http://json-schema.org/hyper-schema#'
|
||||
| 'http://json-schema.org/draft-04/schema#' | 'http://json-schema.org/draft-04/hyper-schema#'
|
||||
| 'http://json-schema.org/draft-03/schema#' | 'http://json-schema.org/draft-03/hyper-schema#'
|
||||
| string
|
||||
$schema?: JSONSchema4Version
|
||||
|
||||
/**
|
||||
* This attribute is a string that provides a short description of the
|
||||
@@ -210,6 +222,19 @@ export type JSONSchema6TypeName = 'string' | 'number' | 'integer' | 'boolean' |
|
||||
|
||||
export type JSONSchema6Type = any[] | boolean | number | null | object | string
|
||||
|
||||
/**
|
||||
* Meta schema
|
||||
*
|
||||
* Recommended values:
|
||||
* - 'http://json-schema.org/schema#'
|
||||
* - 'http://json-schema.org/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-06/schema#'
|
||||
* - 'http://json-schema.org/draft-06/hyper-schema#'
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
||||
*/
|
||||
export type JSONSchema6Version = string;
|
||||
|
||||
/**
|
||||
* JSON Schema V6
|
||||
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01
|
||||
@@ -218,8 +243,7 @@ export type JSONSchema6Definition = JSONSchema6 | boolean;
|
||||
export interface JSONSchema6 {
|
||||
$id?: string
|
||||
$ref?: string
|
||||
$schema?: 'http://json-schema.org/schema#' | 'http://json-schema.org/hyper-schema#' |
|
||||
'http://json-schema.org/draft-06/schema#' | 'http://json-schema.org/draft-06/hyper-schema#'
|
||||
$schema?: JSONSchema6Version
|
||||
|
||||
/**
|
||||
* Must be strictly greater than 0.
|
||||
@@ -502,12 +526,16 @@ export interface JSONSchema7Array extends Array<JSONSchema7Type> {}
|
||||
|
||||
/**
|
||||
* Meta schema
|
||||
*
|
||||
* Recommended values:
|
||||
* - 'http://json-schema.org/schema#'
|
||||
* - 'http://json-schema.org/hyper-schema#'
|
||||
* - 'http://json-schema.org/draft-07/schema#'
|
||||
* - 'http://json-schema.org/draft-07/hyper-schema#'
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
||||
*/
|
||||
export type JSONSchema7Version = 'http://json-schema.org/schema#'
|
||||
| 'http://json-schema.org/hyper-schema#'
|
||||
| 'http://json-schema.org/draft-07/schema#'
|
||||
| 'http://json-schema.org/draft-07/hyper-schema#';
|
||||
export type JSONSchema7Version = string;
|
||||
|
||||
/**
|
||||
* JSON Schema v7
|
||||
|
||||
Reference in New Issue
Block a user