Skip to content

Commit 73700bd

Browse files
authored
Merge pull request #1314 from Sage-Bionetworks/update_curator_doc
Added notes for distinguising pattern from regex
2 parents c277ef5 + c77a733 commit 73700bd

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

docs/explanations/curator_data_model.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,15 @@ JSON Schema output:
195195

196196
### Format
197197

198-
The format of this attribute. See [format](https://json-schema.org/understanding-json-schema/reference/type#format) The type of this attribute must be "string" or "string_list". The value of this column will appear as the `format` of this attribute in the JSON Schema. Must be one of:
198+
The format of this attribute. See [format](https://json-schema.org/understanding-json-schema/reference/type#format) The type of this attribute must be "string" or "string_list". The value of this column will appear as the `format` of this attribute in the JSON Schema.
199+
200+
Note: The Format and Pattern columns serve different purposes:
201+
202+
`Pattern`: Use to validate that data matches a specific regex pattern (e.g., enforce that email addresses follow a certain format)
203+
204+
`Format`: Use with the regex value to indicate that the data itself is a regex pattern being stored (not validated against one)
205+
206+
Must be one of:
199207

200208
- `date-time`
201209
- `email`
@@ -244,6 +252,12 @@ JSON Schema output:
244252

245253
The regex pattern this attribute must match. The type of this attribute must be `string` or `string_list`. See [pattern](https://json-schema.org/understanding-json-schema/reference/regular_expressions#regular-expressions) The value of this column will appear as the `pattern` of this attribute in the JSON Schema. Must be a legal regex pattern as determined by the python `re` library.
246254

255+
Note: The Format and Pattern columns serve different purposes:
256+
257+
`Pattern`: Use to validate that data matches a specific regex pattern (e.g., enforce that email addresses follow a certain format)
258+
259+
`Format`: Use with the regex value to indicate that the data itself is a regex pattern being stored (not validated against one)
260+
247261
Data Model:
248262

249263
| Attribute | DependsOn | columnType | Pattern | IsTemplate |

0 commit comments

Comments
 (0)