File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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+ */
1128const DEFAULT_SCHEME = [
1229 {
1330 name : "id" ,
You can’t perform that action at this time.
0 commit comments