Skip to content

validateDatasetDescriptor

validateDatasetDescriptor(source, options?): Promise<{ dataset: undefined | { $schema?: string; alternateIdentifiers?: object[]; contributors?: object[]; creators?: object[]; dates?: object[]; descriptions?: object[]; doi?: string; formats?: string[]; fundingReferences?: object[]; geoLocations?: object[]; language?: string; prefix?: string; publicationYear?: string; publisher?: { lang?: string; name: string; publisherIdentifier?: string; publisherIdentifierScheme?: string; schemeUri?: string; }; relatedIdentifiers?: object[]; relatedItems?: object[]; resources?: object[]; rightsList?: object[]; sizes?: string[]; subjects?: object[]; suffix?: string; titles?: object[]; types?: { resourceType?: string; resourceTypeGeneral: "Other" | "Audiovisual" | "Award" | "Book" | "BookChapter" | "Collection" | "ComputationalNotebook" | "ConferencePaper" | "ConferenceProceeding" | "DataPaper" | "Dataset" | "Dissertation" | "Event" | "Image" | "Instrument" | "InteractiveResource" | "Journal" | "JournalArticle" | "Model" | "OutputManagementPlan" | "PeerReview" | "PhysicalObject" | "Preprint" | "Project" | "Report" | "Service" | "Software" | "Sound" | "Standard" | "StudyRegistration" | "Text" | "Workflow"; }; version?: string; }; 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/dataset/validate.ts:10

string | Record<string, unknown> | { $schema?: string; alternateIdentifiers?: object[]; contributors?: object[]; creators?: object[]; dates?: object[]; descriptions?: object[]; doi?: string; formats?: string[]; fundingReferences?: object[]; geoLocations?: object[]; language?: string; prefix?: string; publicationYear?: string; publisher?: { lang?: string; name: string; publisherIdentifier?: string; publisherIdentifierScheme?: string; schemeUri?: string; }; relatedIdentifiers?: object[]; relatedItems?: object[]; resources?: object[]; rightsList?: object[]; sizes?: string[]; subjects?: object[]; suffix?: string; titles?: object[]; types?: { resourceType?: string; resourceTypeGeneral: "Other" | "Audiovisual" | "Award" | "Book" | "BookChapter" | "Collection" | "ComputationalNotebook" | "ConferencePaper" | "ConferenceProceeding" | "DataPaper" | "Dataset" | "Dissertation" | "Event" | "Image" | "Instrument" | "InteractiveResource" | "Journal" | "JournalArticle" | "Model" | "OutputManagementPlan" | "PeerReview" | "PhysicalObject" | "Preprint" | "Project" | "Report" | "Service" | "Software" | "Sound" | "Standard" | "StudyRegistration" | "Text" | "Workflow"; }; version?: string; }

string

Promise<{ dataset: undefined | { $schema?: string; alternateIdentifiers?: object[]; contributors?: object[]; creators?: object[]; dates?: object[]; descriptions?: object[]; doi?: string; formats?: string[]; fundingReferences?: object[]; geoLocations?: object[]; language?: string; prefix?: string; publicationYear?: string; publisher?: { lang?: string; name: string; publisherIdentifier?: string; publisherIdentifierScheme?: string; schemeUri?: string; }; relatedIdentifiers?: object[]; relatedItems?: object[]; resources?: object[]; rightsList?: object[]; sizes?: string[]; subjects?: object[]; suffix?: string; titles?: object[]; types?: { resourceType?: string; resourceTypeGeneral: "Other" | "Audiovisual" | "Award" | "Book" | "BookChapter" | "Collection" | "ComputationalNotebook" | "ConferencePaper" | "ConferenceProceeding" | "DataPaper" | "Dataset" | "Dissertation" | "Event" | "Image" | "Instrument" | "InteractiveResource" | "Journal" | "JournalArticle" | "Model" | "OutputManagementPlan" | "PeerReview" | "PhysicalObject" | "Preprint" | "Project" | "Report" | "Service" | "Software" | "Sound" | "Standard" | "StudyRegistration" | "Text" | "Workflow"; }; version?: string; }; 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; }>