UNPKG

@dpkit/core

Version:

Fast TypeScript data management framework built on top of the Data Package standard and Polars DataFrames

1,064 lines (1,063 loc) 79.5 kB
{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Table Schema", "type": ["string", "object"], "required": ["fields"], "properties": { "$schema": { "default": "https://datapackage.org/profiles/1.0/tableschema.json", "propertyOrder": 10, "title": "Profile", "type": "string" }, "fields": { "type": "array", "minItems": 1, "items": { "title": "Table Schema Field", "type": "object", "oneOf": [ { "type": "object", "title": "String Field", "required": ["name"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ], "default": [""] }, "categories": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ] }, "categoriesOrdered": { "type": "boolean" }, "type": { "enum": ["string"] }, "format": { "enum": ["default", "email", "uri", "binary", "uuid"], "default": "default" }, "constraints": { "title": "Constraints", "type": "object", "properties": { "required": { "type": "boolean" }, "unique": { "type": "boolean" }, "pattern": { "type": "string" }, "enum": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, "minLength": { "type": "integer" }, "maxLength": { "type": "integer" } } }, "rdfType": { "type": "string" } } }, { "type": "object", "title": "Number Field", "required": ["name", "type"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ], "default": [""] }, "type": { "enum": ["number"] }, "format": { "enum": ["default"], "default": "default" }, "bareNumber": { "type": "boolean", "title": "bareNumber", "default": true }, "groupChar": { "type": "string", "title": "groupChar" }, "decimalChar": { "type": "string" }, "constraints": { "title": "Constraints", "type": "object", "properties": { "required": { "type": "boolean" }, "unique": { "type": "boolean" }, "enum": { "oneOf": [ { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "number" } } ] }, "minimum": { "oneOf": [ { "type": "string" }, { "type": "number" } ] }, "maximum": { "oneOf": [ { "type": "string" }, { "type": "number" } ] }, "exclusiveMinimum": { "oneOf": [ { "type": "string" }, { "type": "number" } ] }, "exclusiveMaximum": { "oneOf": [ { "type": "string" }, { "type": "number" } ] } } }, "rdfType": { "type": "string" } } }, { "type": "object", "title": "Integer Field", "required": ["name", "type"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ], "default": [""] }, "categories": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "integer" }, "label": { "type": "string" } } } } ] }, "categoriesOrdered": { "type": "boolean" }, "type": { "enum": ["integer"] }, "format": { "enum": ["default"], "default": "default" }, "bareNumber": { "type": "boolean", "title": "bareNumber", "default": true }, "groupChar": { "type": "string", "title": "groupChar" }, "constraints": { "title": "Constraints", "type": "object", "properties": { "required": { "type": "boolean" }, "unique": { "type": "boolean" }, "enum": { "oneOf": [ { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "integer" } } ] }, "minimum": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "maximum": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "exclusiveMinimum": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "exclusiveMaximum": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] } } }, "rdfType": { "type": "string" } } }, { "type": "object", "title": "Date Field", "required": ["name", "type"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ], "default": [""] }, "type": { "enum": ["date"] }, "format": { "default": "default" }, "constraints": { "title": "Constraints", "type": "object", "properties": { "required": { "type": "boolean" }, "unique": { "type": "boolean" }, "enum": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, "minimum": { "type": "string" }, "maximum": { "type": "string" }, "exclusiveMinimum": { "type": "string" }, "exclusiveMaximum": { "type": "string" } } }, "rdfType": { "type": "string" } } }, { "type": "object", "title": "Time Field", "required": ["name", "type"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ], "default": [""] }, "type": { "enum": ["time"] }, "format": { "default": "default" }, "constraints": { "title": "Constraints", "type": "object", "properties": { "required": { "type": "boolean" }, "unique": { "type": "boolean" }, "enum": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, "minimum": { "type": "string" }, "maximum": { "type": "string" }, "exclusiveMinimum": { "type": "string" }, "exclusiveMaximum": { "type": "string" } } }, "rdfType": { "type": "string" } } }, { "type": "object", "title": "Date Time Field", "required": ["name", "type"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ], "default": [""] }, "type": { "enum": ["datetime"] }, "format": { "default": "default" }, "constraints": { "title": "Constraints", "type": "object", "properties": { "required": { "type": "boolean" }, "unique": { "type": "boolean" }, "enum": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, "minimum": { "type": "string" }, "maximum": { "type": "string" }, "exclusiveMinimum": { "type": "string" }, "exclusiveMaximum": { "type": "string" } } }, "rdfType": { "type": "string" } } }, { "type": "object", "title": "Year Field", "required": ["name", "type"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ], "default": [""] }, "type": { "enum": ["year"] }, "format": { "enum": ["default"], "default": "default" }, "constraints": { "title": "Constraints", "type": "object", "properties": { "required": { "type": "boolean" }, "unique": { "type": "boolean" }, "enum": { "oneOf": [ { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "integer" } } ] }, "minimum": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "maximum": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "exclusiveMinimum": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "exclusiveMaximum": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] } } }, "rdfType": { "type": "string" } } }, { "type": "object", "title": "Year Month Field", "required": ["name", "type"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ], "default": [""] }, "type": { "enum": ["yearmonth"] }, "format": { "enum": ["default"], "default": "default" }, "constraints": { "title": "Constraints", "type": "object", "properties": { "required": { "type": "boolean" }, "unique": { "type": "boolean" }, "enum": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string" } }, "minimum": { "type": "string" }, "maximum": { "type": "string" }, "exclusiveMinimum": { "type": "string" }, "exclusiveMaximum": { "type": "string" } } }, "rdfType": { "type": "string" } } }, { "type": "object", "title": "Boolean Field", "required": ["name", "type"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["value"], "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } ], "default": [""] }, "type": { "enum": ["boolean"] }, "format": { "enum": ["default"], "default": "default" }, "trueValues": { "type": "array", "minItems": 1, "items": { "type": "string" }, "default": ["true", "True", "TRUE", "1"] }, "falseValues": { "type": "array", "minItems": 1, "items": { "type": "string" }, "default": ["false", "False", "FALSE", "0"] }, "constraints": { "title": "Constraints", "type": "object", "properties": { "required": { "type": "boolean" }, "enum": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "boolean" } } } }, "rdfType": { "type": "string" } } }, { "type": "object", "title": "Object Field", "required": ["name", "type"], "properties": { "name": { "title": "Name", "type": "string" }, "title": { "title": "Title", "type": "string" }, "description": { "title": "Description", "type": "string" }, "example": { "title": "Example", "type": "string" }, "missingValues": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object",