Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

JsonSchema

import type { JsonSchema } from "https://googleapis.deno.dev/v1/connectors:v2.ts";

JsonSchema representation of schema metadata

interface JsonSchema {
$comment?: string;
$defs?: {
[key: string]: JsonSchema;
}
;
$id?: string;
$ref?: string;
$schema?: string;
additionalDetails?: {
[key: string]: any;
}
;
additionalItems?: JsonSchema;
additionalProperties?: JsonSchema;
allOf?: JsonSchema[];
anyOf?: JsonSchema[];
const?: any;
contains?: JsonSchema;
contentEncoding?: string;
contentMediaType?: string;
default?: any;
definitions?: {
[key: string]: JsonSchema;
}
;
dependencies?: {
[key: string]: any;
}
;
description?: string;
else?: JsonSchema;
enum?: any[];
examples?: any[];
exclusiveMaximum?: any;
exclusiveMinimum?: any;
format?: string;
items?: JsonSchema;
jdbcType?:
| "DATA_TYPE_UNSPECIFIED"
| "INT"
| "SMALLINT"
| "DOUBLE"
| "DATE"
| "DATETIME"
| "TIME"
| "STRING"
| "LONG"
| "BOOLEAN"
| "DECIMAL"
| "UUID"
| "BLOB"
| "BIT"
| "TINYINT"
| "INTEGER"
| "BIGINT"
| "FLOAT"
| "REAL"
| "NUMERIC"
| "CHAR"
| "VARCHAR"
| "LONGVARCHAR"
| "TIMESTAMP"
| "NCHAR"
| "NVARCHAR"
| "LONGNVARCHAR"
| "NULL"
| "OTHER"
| "JAVA_OBJECT"
| "DISTINCT"
| "STRUCT"
| "ARRAY"
| "CLOB"
| "REF"
| "DATALINK"
| "ROWID"
| "BINARY"
| "VARBINARY"
| "LONGVARBINARY"
| "NCLOB"
| "SQLXML"
| "REF_CURSOR"
| "TIME_WITH_TIMEZONE"
| "TIMESTAMP_WITH_TIMEZONE";
maximum?: any;
maxItems?: number;
maxLength?: number;
maxProperties?: number;
minimum?: any;
minItems?: number;
minLength?: number;
minProperties?: number;
multipleOf?: number;
not?: JsonSchema;
oneOf?: JsonSchema[];
pattern?: string;
patternProperties?: {
[key: string]: JsonSchema;
}
;
properties?: {
[key: string]: JsonSchema;
}
;
propertyNames?: JsonSchema;
readOnly?: boolean;
required?: string[];
then?: JsonSchema;
title?: string;
type?: string[];
uniqueItems?: boolean;
writeOnly?: boolean;
}

§Properties

§
$comment?: string
[src]

A comment on the schema.

§
$defs?: {
[key: string]: JsonSchema;
}
[src]

Definitions for the schema.

§
$id?: string
[src]

The URI defining the core schema meta-schema.

§
$ref?: string
[src]

A reference to another schema.

§
$schema?: string
[src]

The URI defining the schema.

§
additionalDetails?: {
[key: string]: any;
}
[src]

Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema

§
additionalItems?: JsonSchema
[src]

Schema for additional items.

§
additionalProperties?: JsonSchema
[src]

Schema for additional properties.

§
allOf?: JsonSchema[]
[src]

Schema that must be valid against all of the sub-schemas.

§
anyOf?: JsonSchema[]
[src]

Schema that must be valid against at least one of the sub-schemas.

§
const?: any
[src]

Const value that the data must match.

§
contains?: JsonSchema
[src]

Schema that applies to at least one item in an array.

§
contentEncoding?: string
[src]

Encoding of the content.

§
contentMediaType?: string
[src]

Media type of the content.

§
default?: any
[src]

The default value of the field or object described by this schema.

§
definitions?: {
[key: string]: JsonSchema;
}
[src]

Definitions for the schema.

§
dependencies?: {
[key: string]: any;
}
[src]

Dependencies for the schema.

§
description?: string
[src]

A description of this schema.

§

Schema that must be valid if the "if" schema is invalid.

§
enum?: any[]
[src]

Possible values for an enumeration. This works in conjunction with type to represent types with a fixed set of legal values

§
examples?: any[]
[src]

Examples of the value.

§
exclusiveMaximum?: any
[src]

Whether the maximum number value is exclusive.

§
exclusiveMinimum?: any
[src]

Whether the minimum number value is exclusive.

§

Schema that must be valid if the "if" schema is valid.

§

Schema that applies to array values, applicable only if this is of type array.

§
jdbcType?: "DATA_TYPE_UNSPECIFIED" | "INT" | "SMALLINT" | "DOUBLE" | "DATE" | "DATETIME" | "TIME" | "STRING" | "LONG" | "BOOLEAN" | "DECIMAL" | "UUID" | "BLOB" | "BIT" | "TINYINT" | "INTEGER" | "BIGINT" | "FLOAT" | "REAL" | "NUMERIC" | "CHAR" | "VARCHAR" | "LONGVARCHAR" | "TIMESTAMP" | "NCHAR" | "NVARCHAR" | "LONGNVARCHAR" | "NULL" | "OTHER" | "JAVA_OBJECT" | "DISTINCT" | "STRUCT" | "ARRAY" | "CLOB" | "REF" | "DATALINK" | "ROWID" | "BINARY" | "VARBINARY" | "LONGVARBINARY" | "NCLOB" | "SQLXML" | "REF_CURSOR" | "TIME_WITH_TIMEZONE" | "TIMESTAMP_WITH_TIMEZONE"
[src]

JDBC datatype of the field.

§
maximum?: any
[src]

Maximum value of the number field.

§
maxItems?: number
[src]

Maximum number of items in the array field.

§
maxLength?: number
[src]

Maximum length of the string field.

§
maxProperties?: number
[src]

Maximum number of properties.

§
minimum?: any
[src]

Minimum value of the number field.

§
minItems?: number
[src]

Minimum number of items in the array field.

§
minLength?: number
[src]

Minimum length of the string field.

§
minProperties?: number
[src]

Minimum number of properties.

§
multipleOf?: number
[src]

Number must be a multiple of this value.

§

Schema that must not be valid.

§
oneOf?: JsonSchema[]
[src]

Schema that must be valid against at least one of the sub-schemas.

§
pattern?: string
[src]

Regex pattern of the string field. This is a string value that describes the regular expression that the string value should match.

§
patternProperties?: {
[key: string]: JsonSchema;
}
[src]

Pattern properties for the schema.

§
properties?: {
[key: string]: JsonSchema;
}
[src]

The child schemas, applicable only if this is of type object. The key is the name of the property and the value is the json schema that describes that property

§
propertyNames?: JsonSchema
[src]

Schema for property names.

§
readOnly?: boolean
[src]

Whether the value is read-only.

§
required?: string[]
[src]

Whether this property is required.

§

Schema that must be valid if the "if" schema is valid.

§
title?: string
[src]

A title of the schema.

§
type?: string[]
[src]

JSON Schema Validation: A Vocabulary for Structural Validation of JSON

§
uniqueItems?: boolean
[src]

Whether the items in the array field are unique.

§
writeOnly?: boolean
[src]

Whether the value is write-only.