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 {
additionalDetails?: {
[key: string]: any;
}
;
default?: any;
description?: string;
enum?: 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";
properties?: {
[key: string]: JsonSchema;
}
;
required?: string[];
type?: string[];
}

§Properties

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

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

§
default?: any
[src]

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

§
description?: string
[src]

A description of this schema.

§
enum?: any[]
[src]

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

§

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.

§
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

§
required?: string[]
[src]

Whether this property is required.

§
type?: string[]
[src]

JSON Schema Validation: A Vocabulary for Structural Validation of JSON