Skip to content

schema

const schema: object

Defined in: lib/json-api-query/index.js:24

A deep copy of the default JSON API query schema, computed once at module load. Callers should clone again if mutation is needed.

$id: string = "jsonapi.json"

$schema: string = "https://json-schema.org/draft/2020-12/schema"

additionalProperties: boolean = false

description: string = "Validation schema for validating JSON API querystrings"

if: object

properties: object

page: object

required: string[]

required: string[]

patternProperties: object

[^a-z]: object

description: string = "https://jsonapi.org/format/#query-parameters"

type: string[]

properties: object

fields: object

additionalProperties: object

properties.fields.additionalProperties.items

Section titled “properties.fields.additionalProperties.items”

items: object

properties.fields.additionalProperties.items.type

Section titled “properties.fields.additionalProperties.items.type”

type: string = "string"

properties.fields.additionalProperties.minItems

Section titled “properties.fields.additionalProperties.minItems”

minItems: number = 1

properties.fields.additionalProperties.type

Section titled “properties.fields.additionalProperties.type”

type: string = "array"

properties.fields.additionalProperties.uniqueItems

Section titled “properties.fields.additionalProperties.uniqueItems”

uniqueItems: boolean = true

description: string = "https://jsonapi.org/format/#fetching-sparse-fieldsets"

minProperties: number = 1

type: string = "object"

filter: object

description: string = "https://jsonapi.org/format/#fetching-filtering"

minProperties: number = 1

type: string = "object"

include: object

description: string = "https://jsonapi.org/format/#fetching-includes"

items: object

type: string = "string"

minItems: number = 1

type: string = "array"

uniqueItems: boolean = true

page: object

additionalProperties: boolean = false

dependentRequired: object

number: string[]

offset: string[]

description: string = "https://jsonapi.org/format/#fetching-pagination"

else: object

if: object

required: string[]

maxProperties: number = 2

then: object

not: object

required: string[]

if: object

required: string[]

minProperties: number = 1

properties: object

cursor: object

properties.page.properties.cursor.minLength

Section titled “properties.page.properties.cursor.minLength”

minLength: number = 1

type: string = "string"

limit: object

minimum: number = 1

type: string = "integer"

number: object

minimum: number = 1

type: string = "integer"

offset: object

minimum: number = 0

type: string = "integer"

size: object

minimum: number = 1

type: string = "integer"

then: object

maxProperties: number = 1

type: string = "object"

sort: object

description: string = "https://jsonapi.org/format/#fetching-sorting"

items: object

type: string = "string"

minItems: number = 1

type: string = "array"

uniqueItems: boolean = true

then: object

not: object

anyOf: object[]

title: string = "JSON API Request Validation"

type: string = "object"

schema JSON Schema 2020-12