Skip to content

テンプレートファイル

テンプレートファイルについて

RDEではテンプレートファイルとして以下のファイルを扱います。RDE構造化処理を実行するとき、以下のファイルが必要になる時があります。

  • invoice.schema.json
  • invoice.json
  • metadata-def.json
  • metadata.json

invoice.schema.jsonについて

送り状のスキーマを定義する。スキーマの形式はJSON Schemaの標準仕様に準拠します。この JSONスキーマは送り状の画面を生成するために使用されますが、RDEToolKitを使うことで送り状のバリデーションとして使われます。

invoice.schema.jsonの構築例

invoice.shcema.jsonの構築例
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rde.nims.go.jp/rde/dataset-templates/dataset_template_custom_sample/invoice.schema.json",
  "description": "RDEデータセットテンプレートサンプル固有情報invoice",
  "type": "object",
  "required": [
    "custom",
    "sample"
  ],
  "properties": {
    "custom": {
      "type": "object",
      "label": {
        "ja": "固有情報",
        "en": "Custom Information"
      },
      "required": [
        "sample1",
        "sample2"
      ],
      "properties": {
        "sample1": {
          "label": {
            "ja": "サンプル1",
            "en": "sample1"
          },
          "type": "string",
          "format": "date",
          "options": {
            "unit": "A"
          }
        },
        "sample2": {
          "label": {
            "ja": "サンプル2",
            "en": "sample2"
          },
          "type": "number",
          "options": {
            "unit": "b"
          }
        },
        "sample3": {
          "label": {
            "ja": "サンプル3",
            "en": "sample3"
          },
          "type": "integer",
          "options": {
            "unit": "c",
            "placeholder": {
              "ja": "Please Enter text",
              "en": "Please Enter text"
            }
          }
        },
      }
    },
    "sample": {
      "type": "object",
      "label": {
        "ja": "試料情報",
        "en": "Sample Information"
      },
      "properties": {
        "generalAttributes": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "required": [
                "termId"
              ],
              "properties": {
                "termId": {
                  "const": "3adf9874-7bcb-e5f8-99cb-3d6fd9d7b55e"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "termId"
              ],
              "properties": {
                "termId": {
                  "const": "e2d20d02-2e38-2cd3-b1b3-66fdb8a11057"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "termId"
              ],
              "properties": {
                "termId": {
                  "const": "efcf34e7-4308-c195-6691-6f4d28ffc9bb"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "termId"
              ],
              "properties": {
                "termId": {
                  "const": "1e70d11d-cbdd-bfd1-9301-9612c29b4060"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "termId"
              ],
              "properties": {
                "termId": {
                  "const": "5e166ac4-bfcd-457a-84bc-8626abe9188f"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "termId"
              ],
              "properties": {
                "termId": {
                  "const": "0d0417a3-3c3b-496a-b0fb-5a26f8a74166"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "termId"
              ],
              "properties": {
                "termId": {
                  "const": "efc6a0d5-313e-1871-190c-baaff7d1bf6c"
                }
              }
            }
          ]
        },
        "specificAttributes": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "required": [
                "classId",
                "termId"
              ],
              "properties": {
                "classId": {
                  "const": "01cb3c01-37a4-5a43-d8ca-f523ca99a75b"
                },
                "termId": {
                  "const": "3250c45d-0ed6-1438-43b5-eb679918604a"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "classId",
                "termId"
              ],
              "properties": {
                "classId": {
                  "const": "01cb3c01-37a4-5a43-d8ca-f523ca99a75b"
                },
                "termId": {
                  "const": "70c2c751-5404-19b7-4a5e-981e6cebbb15"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "classId",
                "termId"
              ],
              "properties": {
                "classId": {
                  "const": "01cb3c01-37a4-5a43-d8ca-f523ca99a75b"
                },
                "termId": {
                  "const": "e2d20d02-2e38-2cd3-b1b3-66fdb8a11057"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "classId",
                "termId"
              ],
              "properties": {
                "classId": {
                  "const": "01cb3c01-37a4-5a43-d8ca-f523ca99a75b"
                },
                "termId": {
                  "const": "518e26a0-4262-86f5-3598-80e18e6ff2af"
                }
              }
            }
          ]
        }
      }
    }
  }
}

invoice.schema.jsonの定義

項目名 (JSONポインタ) フォーマット 必須 固定値 説明
(ドキュメントルート) object - - JSONドキュメントのルート。
/$schema string uri https://json-schema.org/draft/2020-12/schema メタスキーマ(スキーマのスキーマ)のID。
/$id string uri - このスキーマのID。ユニークであること
/description string - - - スキーマの説明
/type string - "object" 値は固定。
/required array - - 固有情報を入力させる場合は"custom"を含める。試料情報を入力させる場合は"sample"を含める。
/properties object - -
  /custom object - - - 送り状の固有情報を格納するオブジェクト。固有情報を入力させない場合は省く。
    /type string - "object" 値は固定。
    /label object - - 固有情報の見出しとして使用する文字列。言語別に指定する。
      /ja string - - 見出しの日本語表記。
      /en string - - 見出しの英語表記。
    /required object - - 必須のキー名を指定する。複数指定可。
    /properties object - - 固有情報項目のマップ。表示や入力する際の項目の順序は、このスキーマでの記述順に従う。
     /{最初のキーの名前} object - - - 最初の項目のキー名。キーの名前はファイル全体でユニークであること。
      /type string - - 項目の値のデータ型。"boolean", "integer", "number", "string"のいずれか1つを指定する。"boolean","integer", "number", "string"のいずれの場合もnullを許容しない。※注1
      /description string - - - 項目の説明。画面には表示しない。
      /examples array - - - 値の例。画面には表示しない。
      /default 任意 - - - 初期値を指定する。
      /{最初のスキーマキーワード} キーワードに依存 - - - 項目の値に関する制約を指定するキーワード。
      /{2番目のスキーマキーワード} キーワードに依存 - - - 同上
      /... - - - -
      /label object - - 画面に表示する項目のラベル。言語別に指定する。
        /ja string - - 日本語表示時のラベル。
        /en string - - 英語表示時のラベル。
      /options object - - - 項目に関するオプションの指定。
        /widget string - - - 画面部品を明示的に指定する場合に使う。"textarea"のみ指定可。通常はtypeの値に応じた画面部品が生成される。
        /rows integer - - - 画面部品がtextareaの場合の行数を指定する。
        /unit string - - - 画面に表示する単位。
        /placeholder object - - - 画面部品に設定するプレイスホルダ。言語別に指定する。省略可能。
          /ja string - - - 日本語表示時のプレイスホルダ。
          /en string - - - 英語表示時のプレイスホルダ。
     /{2番目のキーの名前} object - - - 2番目の項目のキー名。
     (以下繰り返し) - - - -
  /sample object - - - 送り状の試料情報を格納するオブジェクト。試料情報を入力させない場合は省く。
    /type string - "object" 値は固定。
    /label object - - 試料情報の見出しとして使用する文字列。言語別に指定する。
      /ja string - - 見出しの日本語表記。
      /en string - - 見出しの英語表記。
    /properties object - - 試料のプロパティ
      /generalAttributes object - - - 一般項目。一般項目を入力しない場合は省略可。
         /type string - "array"
         /items array - -
           /0 object - - - 最初の一般項目。
             /type string - "object"
             /required array - ["termId"] 一般項目が持つ必須プロパティ。固定。
             /properties object - -
               /termId object - -
                 /const string - - この一般項目の用語ID。
           /1 object - - - 2番目の一般項目。
           (以下繰り返し) - - - -
      /specificAttributes object - - - 分類別項目。分類別項目を入力しない場合は省略可。
         /type string - "array"
         /items array - "string"
           /0 object - - - 最初の分類別項目。
             /type string - "object"
             /required array - ["classId","termId"] 分類別項目が持つ必須プロパティ。固定。
             /properties object - -
               /classId object - -
                 /const string uuid - この分類別項目の試料分類ID。
               /termId object - -
                 /const string - - この分類別項目の用語ID。
           /1 object - - - 2番目の分類別項目。
           (以下繰り返し) - - - -

invoice.schema.jsonで利用可能なスキーマキーワード一覧

項目の値に関する制約として指定可能なスキーマキーワードを下表に示す。

type キーワード 値の型 説明 値の制約
すべて type string 値の型を指定する。取り得る値は"boolean", "integer", "number", "string"のいずれか。 指定できる型は1つのみ
const typeに依存 定数を指定する。このキーワードが存在する場合は入力・編集不可。
enum array 取り得る値を指定する。
numberまたは integer maximum number 数値が指定された値以下であることを宣言する。
exclusiveMaximum number 数値が指定された値未満であることを宣言する。
minimum number 数値が指定された値以上であることを宣言する。
exclusiveMinimum number 数値が指定された値より大きいことを宣言する。
string maxLength integer 文字列の長さの最大値を指定する。 値は2,147,483,647以下であること。
minLength integer 文字列の長さの最小値を指定する。0以上。
pattern string 正規表現で指定したパターンを持つことを宣言する。 開発言語に依存しないパターンに限定
format string 文字列のフォーマットを指定。指定可能な値はフォーマット一覧を参照のこと。

invoice.schema.jsonで利用可能なフォーマット一覧

スキーマキーワードformatが取り得る値を下表に示す。

type キーワード
date 日付。RFC 3339のfull-date。
time 時刻。RFC 3339のfull-time。
uri URI
uuid UUID。URN形式ではなく素のUUID
markdown Markdown形式の文字列。このフォーマットはJSONスキーマの標準仕様には存在しない。

invoice.schema.jsonのオプションについて

項目に関する各種のオプションはoptionsキーワードによって指定できる。オプションとして指定可能なキーワードを下表に示す。

キーワード 値の型 説明
format string 生成する画面部品の種類を明示的に指定する。取り得る値は”textarea”のみとする。
widget string 生成する画面部品の種類を明示的に指定する。取り得る値は”textarea”のみとする。
rows integer widgetの値が”textarea”の場合のrows属性の値を指定する。
unit string 単位の表示内容を指定する。
placeholder object 画面部品に設定するプレイスホルダ。日本語と英語を指定できる。

invoice.jsonについて

invoice.schema.jsonのバリデーションは、必要なフィールドが定義されているかチェックします。

invoice.jsonの構築例

invoice.jsonの構築例
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
  "datasetId": "1s1199df4-0d1v-41b0-1dea-23bf4dh09g12",
  "basic": {
    "dateSubmitted": "",
    "dataOwnerId": "0c233ef274f28e611de4074638b4dc43e737ab993132343532343430",
    "dataName": "test-dataset",
    "instrumentId": null,
    "experimentId": null,
    "description": null
  },
  "custom": {
    "sample1": "2023-01-01",
    "sample2": 1.0,
    "sample3": 1
  },
  "sample": {
    "sampleId": "",
    "names": ["test"],
    "composition": null,
    "referenceUrl": null,
    "description": null,
    "generalAttributes": [
      {
        "termId": "3adf9874-7bcb-e5f8-99cb-3d6fd9d7b55e",
        "value": null
      },
      {
        "termId": "e2d20d02-2e38-2cd3-b1b3-66fdb8a11057",
        "value": null
      },
      {
        "termId": "efcf34e7-4308-c195-6691-6f4d28ffc9bb",
        "value": null
      },
      {
        "termId": "1e70d11d-cbdd-bfd1-9301-9612c29b4060",
        "value": null
      },
      {
        "termId": "5e166ac4-bfcd-457a-84bc-8626abe9188f",
        "value": null
      },
      {
        "termId": "0d0417a3-3c3b-496a-b0fb-5a26f8a74166",
        "value": null
      },
      {
        "termId": "efc6a0d5-313e-1871-190c-baaff7d1bf6c",
        "value": null
      }
    ],
    "specificAttributes": [
      {
        "classId": "01cb3c01-37a4-5a43-d8ca-f523ca99a75b",
        "termId": "3250c45d-0ed6-1438-43b5-eb679918604a",
        "value": null
      },
      {
        "classId": "01cb3c01-37a4-5a43-d8ca-f523ca99a75b",
        "termId": "70c2c751-5404-19b7-4a5e-981e6cebbb15",
        "value": null
      },
      {
        "classId": "01cb3c01-37a4-5a43-d8ca-f523ca99a75b",
        "termId": "e2d20d02-2e38-2cd3-b1b3-66fdb8a11057",
        "value": null
      },
      {
        "classId": "01cb3c01-37a4-5a43-d8ca-f523ca99a75b",
        "termId": "518e26a0-4262-86f5-3598-80e18e6ff2af",
        "value": null
      }
    ],
    "ownerId": "de17c7b3f0ff5126831c2d519f481055ba466ddb6238666132316439"
  }
}

invoice.jsonの定義

項目 (JSONポインタ) バリュー型 フォーマット 必須 説明
(ドキュメントルート) object -
/datasetId string uuid データの登録先となるデータセットのID。
/basic object - 送り状の基本情報を格納するオブジェクト。
  /dateSubmitted string date 送り状が提出された日。読み取り専用。
  /dataOwnerId string - - データを所有するユーザのID。
  /dataName string - データの名前。
  /instrumentId string uuid - 装置ID。
  /experimentId string - - 実験ID。ユーザが自由に採番する。
  /description string - - データセットの説明。
/custom object - - 送り状の固有情報を格納するオブジェクト。オブジェクトに含まれるプロパティは送り状スキーマによって異なる。
  … - - -
/sample object - - 送り状の試料情報を格納するオブジェクト。プロパティはsampleId, ownerIdを除いて試料APIの試料属性と一致。試料への閲覧権限が無い場合は、子のプロパティを含めて出力項目に含めない。
  /sampleId string uuid - 試料のID。送り状の初回提出時に指定した場合、以下のプロパティは不要。
  /names array - 試料名のリスト。
    /0 string - 試料の主たる名前。
    … - - - 2番目以降の名前。
  /composition string - - 試料の組成。
  /referenceUrl string uri - 試料の参考URL。
  /description string - - 試料の説明。
  /generalAttributes array - - 一般試料属性のリスト。画面の一般項目に該当する。
    /0 object - - 最初の属性。※注1 "boolean","integer", "number", "string"は、値の設定がない場合は出力しない。以下。同様。
      /termId string uuid 属性の名前としての用語ID。
      /value string - - 属性の値。
    … - - 2番目以降の属性。
  /specificAttributes array - - 特定試料属性のリスト。画面の分類別項目に該当する。
    /0 object - - 最初の属性。
      /classId string uuid 試料分類のID。
      /termId string uuid 属性の名前としての用語ID。
      /value string - - 属性の値。
    … - - - 2番目以降の属性。
  /ownerId string - - 試料管理者のID。

metadata-def.json

データ構造化が出力するメタデータの名前やデータ型を宣言するファイル。送り状等に入力されるメタデータは、metadata-def.jsonに定義する必要はありません。

metadata-def.jsonの構築例

metadata-def.jsonの構築例
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
    "operator_identifier": {
        "name": {
            "ja": "測定者",
            "en": "Operator identifier"
        },
        "schema": {
            "type": "string"
        },
        "order": 1,
        "originalName": "Operator"
    },
    "comment": {
        "name": {
            "ja": "コメント",
            "en": "Comment"
        },
        "schema": {
            "type": "string"
        },
        "order": 2,
        "originalName": "Comment"
    },
    "memo": {
        "name": {
            "ja": "メモ",
            "en": "Memo"
        },
        "schema": {
            "type": "string"
        },
        "order": 3,
        "originalName": "Memo",
        "variable": 1
    },
    "measurement_operator": {
        "name": {
            "ja": "測定実施者",
            "en": "Measurement Operator"
        },
        "schema": {
            "type": "string"
        },
        "order": 4,
        "originalName": "Operator",
        "variable": 1
    },
    "specimen": {
        "name": {
            "ja": "試料",
            "en": "Specimen"
        },
        "schema": {
            "type": "string"
        },
        "order": 5,
        "originalName": "SampleName",
        "variable": 1
    },
    "peak": {
        "name": {
            "ja": "ピーク値",
            "en": "peak value"
        },
        "schema": {
            "type": "number"
        },
        "unit": "V"
        "order": 6,
        "variable": 1
    }
}

metadata-def.jsonの定義

項目 (JSONポインタ) バリュー型 フォーマット 必須 説明
(ルート) object - JSONドキュメントのルート。
/{最初のキーの名前} object - 最初のメタデータ項目のキー名。全てのキー名はファイル内でユニークであること。
  /name object - -
    /ja string - メタデータ項目名の日本語表記。
    /en string - メタデータ項目名の英語表記。
  /schema object - JSON Schema (2020-12)のキーワードであるtypeとformatを使用する。これらのキーワードの定義はJSON Schemaに従う。
    /type string - "s メタデータの値の型。取り得る値は"array", "boolean"、"integer"、"number"、"string"。"array"の場合、要素の型は規定しない。
    /format string - - "d メタデータの値のフォーマット。取り得る値は"date-time"、"duration"。
  /unit string - - メタデータ項目の値に付加する単位。単位が無い場合は省略する。
  /description string - - メタデータ項目の説明。
  /uri string uri - メタデータ項目のキーに紐づくURI/URL。
  /mode string - - "S このメタデータ項目が有効である計測モード。計測モードの指定がない場合は省略可。
  /order integer - - メタデータ項目の表示順序。値の昇順に表示する。同値の場合の表示順は不定。
/{2番目のキーの名前} object - - 2番目のメタデータ項目のキー名。
  (以下繰り返し) - -

Note

構築例で提示したmetadata-def.jsonにvariableという定義にない属性がある。この場合、RDEでは、variableを無視して取込は行わない。

metadata.json

metadata-def.jsoは、データ構造化処理が抽出したメタデータを格納するファイルです。

metadata.jsonの構築例

metadata.jsonの構築例
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  "constatn": {
    "operator_identifier": {
      "value": "Mike",
    },
    "comment": {
      "value": "sample data",
    },
    "memo": {
      "value": "test",
    },
    "measurement_operator": {
      "value": "Alice",
    },
  },
  "variable": [
    {
      "specimen": {
        "value": "C",
      },
      "peak": {
        "value": 120,
        "unit": "V"
      }
    },
    {
      "specimen": {
        "value": "H",
      },
      "peak": {
        "value": 58,
        "unit": "V"
      }
    },
    {
      "specimen": {
        "value": "O",
      },
      "peak": {
        "value": 190,
        "unit": "V"
      }
    },
  ]
}

metadata.jsonの定義

項目 (JSONポインタ) バリュー型 フォーマット 必須 説明
/constant object - 全ての計測に共通なメタデータの集合。このファイル定義での「計測」には計算などを含む。
  /{キーの名前} object - メタデータのキーの名前。
    /value キーに依存 - メタデータの値。
    /unit string - - メタデータの値の単位。単位が無い場合は省略可。
  /{キーの名前} object - メタデータのキーの名前。
... - -
/variable array - 計測ごとに異なるメタデータセットの配列。
  /0 object - 最初の計測に固有なメタデータの集合。
    /{キーの名前} object - - メタデータのキーの名前。配列の各要素でキーが存在しない場合は省略可能。
      /value キーに依存 - メタデータの値。
      /unit string - - メタデータの値の単位。単位が無い場合は省略可。
    /{キーの名前} object - - メタデータのキーの名前。
    ... - -
  /1 object - 2番目の計測に固有なメタデータの集合。
  (以下繰り返し) - -

繰り返しメタデータについて

RDEには、計測ごとに異なるメタデータセットとして繰り返しメタデータが定義可能です。繰り返しメタデータとして登録する場合、variable: 1というフィールドを追加してください。RDEのシステムには、variableは取込は行われません。

しかし、metadata-def.jsonvariable: 1にセットしたメタデータについては、metadata.jsonvariableに追加されます。

catalog.schema.json

データカタログのスキーマファイル。スキーマの形式はJSON Schemaの標準仕様に準拠します。

catalog.schema.json構築例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://rde.nims.go.jp/rde/dataset-templates/dataset_template_custom_sample/catalog.schema.json",
    "type": "object",
    "required": [
        "catalog"
    ],
    "description": "dataset_template_custom_sample",
    "properties": {
        "catalog": {
            "type": "object",
            "label": {
                "ja": "RDEデータセットテンプレートサンプル固有情報",
                "en": "dataset_template__custom_sample"
            },
            "required": [],
            "properties": {
                "dataset_title": {
                    "label": {
                        "ja": "データセット名",
                        "en": "Dataset Title"
                    },
                    "type": "string"
                },
                "abstract": {
                    "label": {
                        "ja": "概要",
                        "en": "Abstract"
                    },
                    "type": "string"
                },
                "data_creator": {
                    "label": {
                        "ja": "作成者",
                        "en": "Data Creator"
                    },
                    "type": "string"
                },
                "language": {
                    "label": {
                        "ja": "言語",
                        "en": "Language"
                    },
                    "type": "string"
                },
                "experimental_apparatus": {
                    "label": {
                        "ja": "使用装置",
                        "en": "Experimental Apparatus"
                    },
                    "type": "string"
                },
                "data_distribution": {
                    "label": {
                        "ja": "データの再配布",
                        "en": "Data Distribution"
                    },
                    "type": "string"
                },
                "raw_data_type": {
                    "label": {
                        "ja": "データの種類",
                        "en": "Raw Data Type"
                    },
                    "type": "string"
                },
                "stored_data": {
                    "label": {
                        "ja": "格納データ",
                        "en": "Stored Data"
                    },
                    "type": "string",
                    "options": {
                        "widget": "textarea",
                        "rows": 5
                    }
                },
                "remarks": {
                    "label": {
                        "ja": "備考",
                        "en": "Remarks"
                    },
                    "type": "string",
                    "options": {
                        "widget": "textarea",
                        "rows": 5
                    }
                },
                "references": {
                    "label": {
                        "ja": "参考論文",
                        "en": "References"
                    },
                    "type": "string"
                }
            }
        }
    }
}

catalog.schema.jsonの定義

項目 (JSONポインタ表現) バリュー型 フォーマット 必須 説明
(ドキュメントルート) object -
/$schema string uri メタスキーマ(スキーマのスキーマ)のID。固定文字列https://json-schema.org/draft/2020-12/schemaを指定。
/$id string uri このスキーマのID。ユニークであること。
/description string - - このスキーマの説明。
/type string - 値は固定。
/required array - - 値は固定。
/properties object -
  /catalog object - データカタログ項目を格納するオブジェクト。
    /type string - 値は固定。
    /label object - 見出しとして使用する文字列。言語別に指定する。
      /ja string - 見出しの日本語表記。
      /en string - 見出しの英語表記。
    /required object - 必須のキー名を指定する。複数指定可。
    /properties object - データカタログ項目のマップ。表示や入力する際の項目の順序は、このスキーマでの記述順に従う。
      /{最初のキーの名前} object - 最初の項目のキー名。キーの名前はファイル全体でユニークであること。
        /type string - 項目の値のデータ型。"boolean", "integer", "number", "string"のいずれか1つを指定する。
        /description string - - 項目の説明。画面には表示しない。
        /examples array - - 値の例。画面には表示しない。
        /default 任意 - - 初期値を指定する。
        /{最初のスキーマキーワード} キーワードに依存 - - 項目の値に関する制約を指定するキーワード。
        /{2番目のスキーマキーワード} キーワードに依存 - - 同上
        … - - -
        /label object - 画面に表示する項目のラベル。言語別に指定する。
          /ja string - 日本語表示時のラベル。
          /en string - 英語表示時のラベル。
        /options object - - 項目に関するオプションの指定。
          /widget string - - 画面部品を明示的に指定する場合に使う。"textarea"のみ指定可。通常はtypeの値に応じた画面部品が生成される。
          /rows integer - - 画面部品がtextareaの場合の行数を指定する。
          /unit string - - 画面に表示する単位。
          /placeholder object - - 画面部品に設定するプレイスホルダ。言語別に指定する。省略可能。
            /ja string - - 日本語表示時のプレイスホルダ。
            /en string - - 英語表示時のプレイスホルダ。
      /{2番目のキーの名前} object - 2番目の項目のキー名。
        (以下繰り返し)- - -

catalog.schema.jsonで利用可能なスキーマキーワード一覧

項目の値に関する制約として指定可能なスキーマキーワードを下表に示す。

type キーワード 値の型 説明 値の制約
すべて type string 値の型を指定する。取り得る値は"boolean", "integer", "number", "string"のいずれか。 指定できる型は1つのみ
const typeに依存 定数を指定する。このキーワードが存在する場合は入力・編集不可。
enum array 取り得る値を指定する。
numberまたは integer maximum number 数値が指定された値以下であることを宣言する。
exclusiveMaximum number 数値が指定された値未満であることを宣言する。
minimum number 数値が指定された値以上であることを宣言する。
exclusiveMinimum number 数値が指定された値より大きいことを宣言する。
string maxLength integer 文字列の長さの最大値を指定する。 値は2,147,483,647以下であること。
minLength integer 文字列の長さの最小値を指定する。0以上。
pattern string 正規表現で指定したパターンを持つことを宣言する。 開発言語に依存しないパターンに限定
format string 文字列のフォーマットを指定。指定可能な値はフォーマット一覧を参照のこと。

catalog.schema.jsonのオプションについて

項目に関する各種のオプションはoptionsキーワードによって指定できる。オプションとして指定可能なキーワードを下表に示す。

キーワード 値の型 説明
format string 生成する画面部品の種類を明示的に指定する。取り得る値は”textarea”のみとする。
widget string 生成する画面部品の種類を明示的に指定する。取り得る値は”textarea”のみとする。
rows integer widgetの値が”textarea”の場合のrows属性の値を指定する。
unit string 単位の表示内容を指定する。
placeholder object 画面部品に設定するプレイスホルダ。日本語と英語を指定できる。