Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface JsonSchema

Interface for Stencila JsonSchema instances.

The JsonSchema interface extends JSON Schema with additional properties for:

  • defining inheritance,
  • defining property aliases
  • specifying codecs used in coercion
  • categorizing node types

For more details see the guidelines for authoring schemas.

Hierarchy

  • JSONSchema7
    • JsonSchema

Index

Properties

Optional $comment

$comment: string

Optional $id

$id: string

Optional $ref

$ref: string

Optional $schema

$schema: string

Optional @id

@id: string

The id for the type or property schema to be used when generating JSON-LD.

Optional additionalItems

additionalItems: JSONSchema7Definition

Optional additionalProperties

additionalProperties: JSONSchema7Definition

Optional aliases

aliases: string[]

Aliases for this property schema. Only applies when used in a property of another schema.

Optional allOf

allOf: JsonSchema[]

Optional anyOf

anyOf: JsonSchema[]

Optional category

category: string

The category of node that this schema belongs to.

Optional children

children: string[]

The names of the child (direct descendants) schemas of this schema. Added during schema processing.

Optional const

const: JSONSchema7Type

Optional contains

contains: JSONSchema7

Optional contentEncoding

contentEncoding: string

Optional contentMediaType

contentMediaType: string

Optional default

default: JSONSchema7Type

Optional definitions

definitions: {}

Type declaration

  • [key: string]: JSONSchema7Definition

Optional dependencies

dependencies: {}

Type declaration

  • [key: string]: JSONSchema7Definition | string[]

Optional descendants

descendants: string[]

The descendant schemas of this schema. Added during schema processing.

Optional description

description: string

Optional else

else: JSONSchema7Definition

Optional enum

enum: (string | number)[]

Optional examples

examples: JSONSchema7Type

Optional exclusiveMaximum

exclusiveMaximum: number

Optional exclusiveMinimum

exclusiveMinimum: number

Optional extends

extends: string

The schema that this schema extends.

Optional file

file: string

The file in which this schema is defined. Added during schema processing.

Optional format

format: string

Optional from

from: string

The schema from which this property schema was inherited. Only applies when used in a property of another schema. Added during schema processing.

Optional if

if: JSONSchema7Definition

Optional isArray

isArray: boolean

Is the property an array?

Optional isOverride

isOverride: boolean

Is this property schema an override of a property inherited from an ancestor. Examples of overrides include making an optional property required, or changing the schema of the property.

Optional isPlural

isPlural: boolean

Is the property an array and have a pluralized name e.g. authors

Optional items

items: JsonSchema[]

Optional maxItems

maxItems: number

Optional maxLength

maxLength: number

Optional maxProperties

maxProperties: number

Optional maximum

maximum: number

Optional minItems

minItems: number

Optional minLength

minLength: number

Optional minProperties

minProperties: number

Optional minimum

minimum: number

Optional multipleOf

multipleOf: number

Optional not

not: JSONSchema7Definition

Optional oneOf

oneOf: JSONSchema7Definition[]

Optional parser

parser: string

The name of a parser that can be used to decode values for this schema.

Optional pattern

pattern: string

Optional patternProperties

patternProperties: {}

Type declaration

  • [key: string]: JSONSchema7Definition

Optional properties

properties: {}

Type declaration

Optional propertyAliases

propertyAliases: {}

A map of property aliases. Added during schema processing based on the aliases of properties.

Type declaration

  • [key: string]: string

Optional propertyNames

propertyNames: JSONSchema7Definition

Optional readOnly

readOnly: boolean

Optional required

required: string[]

Optional role

role: "base" | "primary" | "secondary" | "tertiary"

The role that this schema has.

Optional source

source: string

The source file for this schema. A URL that can be used to provide a link to view or edit the source.

Optional status

status: "experimental" | "unstable" | "stable"

The current status of this schema.

Optional then

then: JSONSchema7Definition

Optional title

title: string

Optional type

type: JSONSchema7TypeName | JSONSchema7TypeName[]

Optional uniqueItems

uniqueItems: boolean

Optional writeOnly

writeOnly: boolean

Generated using TypeDoc