Skip to content

validateDescriptor

validateDescriptor(descriptor, options): Promise<{ errors: ({ resourceName: string; type: "resource/missing"; } | { expectedResourceType: "table" | "data"; type: "resource/type"; } | { columnName: string; type: "column/missing"; } | { actualColumnType: "string" | "number" | "boolean" | "object" | "unknown" | "date" | "array" | "integer" | "categorical" | "list" | "date-time" | "time" | "base64" | "hex" | "email" | "url" | "duration" | "wkt" | "wkb" | "decimal" | "geojson" | "topojson"; columnName: string; expectedColumnType: "string" | "number" | "boolean" | "object" | "unknown" | "date" | "array" | "integer" | "categorical" | "list" | "date-time" | "time" | "base64" | "hex" | "email" | "url" | "duration" | "wkt" | "wkb" | "decimal" | "geojson" | "topojson"; type: "column/type"; } | { columnNames: string[]; rowNumber: number; type: "row/primaryKey"; } | { columnNames: string[]; rowNumber: number; type: "row/uniqueKey"; } | { cell: string; columnName: string; columnType: "string" | "number" | "boolean" | "object" | "unknown" | "date" | "array" | "integer" | "categorical" | "list" | "date-time" | "time" | "base64" | "hex" | "email" | "url" | "duration" | "wkt" | "wkb" | "decimal" | "geojson" | "topojson"; rowNumber: number; type: "cell/type"; } | { cell: string; columnName: string; rowNumber: number; type: "cell/required"; } | { cell: string; columnName: string; minimum: string; rowNumber: number; type: "cell/minimum"; } | { cell: string; columnName: string; maximum: string; rowNumber: number; type: "cell/maximum"; } | { cell: string; columnName: string; minimum: string; rowNumber: number; type: "cell/exclusiveMinimum"; } | { cell: string; columnName: string; maximum: string; rowNumber: number; type: "cell/exclusiveMaximum"; } | { cell: string; columnName: string; multipleOf: number; rowNumber: number; type: "cell/multipleOf"; } | { cell: string; columnName: string; minLength: number; rowNumber: number; type: "cell/minLength"; } | { cell: string; columnName: string; maxLength: number; rowNumber: number; type: "cell/maxLength"; } | { cell: string; columnName: string; minItems: number; rowNumber: number; type: "cell/minItems"; } | { cell: string; columnName: string; maxItems: number; rowNumber: number; type: "cell/maxItems"; } | { cell: string; columnName: string; pattern: string; rowNumber: number; type: "cell/pattern"; } | { cell: string; columnName: string; rowNumber: number; type: "cell/unique"; } | { cell: string; columnName: string; const: string; rowNumber: number; type: "cell/const"; } | { cell: string; columnName: string; enum: string[]; rowNumber: number; type: "cell/enum"; } | { cell: string; columnName: string; jsonPointer: string; message: string; rowNumber: number; type: "cell/json"; } | { actualEncoding?: string; type: "file/textual"; } | { actualHash: string; expectedHash: string; hashType: string; type: "file/integrity"; } | { jsonPointer: string; message: string; type: "metadata"; } | { cells: string[]; foreignKey: { columns: string[]; reference: { columns: string[]; resource?: string; }; }; type: "foreignKey"; } | { jsonPointer: string; message: string; type: "data"; } | ({ type: “resource/missing”; resourceName: string; } | { type: “resource/type”; expectedResourceType: “table” | “data”; } | { type: “column/missing”; columnName: string; } | { type: “column/type”; columnName: string; expectedColumnType: “string” | … 20 more … | “topojson”; actualColumnType: “string” | … 20 mor…)[]; valid: boolean; }>

Defined in: metadata/actions/descriptor/validate.ts:6

Descriptor

Profile

string

Promise<{ errors: ({ resourceName: string; type: "resource/missing"; } | { expectedResourceType: "table" | "data"; type: "resource/type"; } | { columnName: string; type: "column/missing"; } | { actualColumnType: "string" | "number" | "boolean" | "object" | "unknown" | "date" | "array" | "integer" | "categorical" | "list" | "date-time" | "time" | "base64" | "hex" | "email" | "url" | "duration" | "wkt" | "wkb" | "decimal" | "geojson" | "topojson"; columnName: string; expectedColumnType: "string" | "number" | "boolean" | "object" | "unknown" | "date" | "array" | "integer" | "categorical" | "list" | "date-time" | "time" | "base64" | "hex" | "email" | "url" | "duration" | "wkt" | "wkb" | "decimal" | "geojson" | "topojson"; type: "column/type"; } | { columnNames: string[]; rowNumber: number; type: "row/primaryKey"; } | { columnNames: string[]; rowNumber: number; type: "row/uniqueKey"; } | { cell: string; columnName: string; columnType: "string" | "number" | "boolean" | "object" | "unknown" | "date" | "array" | "integer" | "categorical" | "list" | "date-time" | "time" | "base64" | "hex" | "email" | "url" | "duration" | "wkt" | "wkb" | "decimal" | "geojson" | "topojson"; rowNumber: number; type: "cell/type"; } | { cell: string; columnName: string; rowNumber: number; type: "cell/required"; } | { cell: string; columnName: string; minimum: string; rowNumber: number; type: "cell/minimum"; } | { cell: string; columnName: string; maximum: string; rowNumber: number; type: "cell/maximum"; } | { cell: string; columnName: string; minimum: string; rowNumber: number; type: "cell/exclusiveMinimum"; } | { cell: string; columnName: string; maximum: string; rowNumber: number; type: "cell/exclusiveMaximum"; } | { cell: string; columnName: string; multipleOf: number; rowNumber: number; type: "cell/multipleOf"; } | { cell: string; columnName: string; minLength: number; rowNumber: number; type: "cell/minLength"; } | { cell: string; columnName: string; maxLength: number; rowNumber: number; type: "cell/maxLength"; } | { cell: string; columnName: string; minItems: number; rowNumber: number; type: "cell/minItems"; } | { cell: string; columnName: string; maxItems: number; rowNumber: number; type: "cell/maxItems"; } | { cell: string; columnName: string; pattern: string; rowNumber: number; type: "cell/pattern"; } | { cell: string; columnName: string; rowNumber: number; type: "cell/unique"; } | { cell: string; columnName: string; const: string; rowNumber: number; type: "cell/const"; } | { cell: string; columnName: string; enum: string[]; rowNumber: number; type: "cell/enum"; } | { cell: string; columnName: string; jsonPointer: string; message: string; rowNumber: number; type: "cell/json"; } | { actualEncoding?: string; type: "file/textual"; } | { actualHash: string; expectedHash: string; hashType: string; type: "file/integrity"; } | { jsonPointer: string; message: string; type: "metadata"; } | { cells: string[]; foreignKey: { columns: string[]; reference: { columns: string[]; resource?: string; }; }; type: "foreignKey"; } | { jsonPointer: string; message: string; type: "data"; } | ({ type: “resource/missing”; resourceName: string; } | { type: “resource/type”; expectedResourceType: “table” | “data”; } | { type: “column/missing”; columnName: string; } | { type: “column/type”; columnName: string; expectedColumnType: “string” | … 20 more … | “topojson”; actualColumnType: “string” | … 20 mor…)[]; valid: boolean; }>