Skip to content

Commit 7346c0b

Browse files
committed
Merge branch 'data-processing-refactoring' into local-examples-cleanups
2 parents e0062d1 + 914c363 commit 7346c0b

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

vis/js/dataschemes/defaultScheme.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,24 @@ import {
77
stringArrayValidator,
88
} from "../utils/data";
99

10-
// name; required?; type?; protected?; validator?; sanitizer?; fallback?;
10+
/**
11+
* Scheme object based on the metadata spreadsheet.
12+
*
13+
* https://docs.google.com/spreadsheets/d/112Anbf-sJYkehyFvjuxr1DuMih-fPB9nt3E8ll19Iyc/edit#gid=0
14+
*
15+
* It's an array of objects, each object describes a paper property.
16+
*
17+
* It has the following properties:
18+
*
19+
* - name: string - the paper property's name
20+
* - required?: boolean - true for mandatory properties
21+
* - type?: string[] - list of allowed js types
22+
* - protected?: boolean - true for properties that shouldn't be escaped
23+
* - validator?: (value: any) => boolean - validator function that receives the property value and returns true if the value is valid
24+
* - sanitizer?: (value: any) => any - sanitizer function that sanitizes the property value
25+
* - fallback?: (localization?: object, paper?: object) => any - fallback function that returns a fallback value
26+
*
27+
*/
1128
const DEFAULT_SCHEME = [
1229
{
1330
name: "id",

0 commit comments

Comments
 (0)