Skip to content

Commit

Permalink
Merge pull request #88 from HumanCellAtlas/v410_add_regex
Browse files Browse the repository at this point in the history
Add regex to fields in v4.1.0
  • Loading branch information
daniwelter authored Dec 5, 2017
2 parents f484cea + 0fd7994 commit 15d2f42
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
3 changes: 1 addition & 2 deletions json_schema/death.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
}
},
"required": [
"cause_of_death",
"time_of_death"
"cause_of_death"
],
"title": "death",
"type": "object"
Expand Down
25 changes: 13 additions & 12 deletions json_schema/donor.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@
"properties": {
"age": {
"description": "Age in age_units. For embryos, measured since fertilization. For all others, measured since birth.",
"maximum": 150,
"minimum": 0,
"type": "number"
"pattern": "^[0-9]+\\.?[0-9]*-?[0-9]*\\.?[0-9]*$",
"type": "string"
},
"age_unit": {
"description": "The unit in which age is expressed. Must be one of day, week, month, or year.",
"enum": [
"hour",
"day",
"week",
"year"
"year",
"hours",
"days",
"weeks",
"years"
]
},
"alcohol_history": {
Expand Down Expand Up @@ -55,10 +58,9 @@
"type": "string"
},
"height": {
"description": "Height of donor in meters.",
"maximum": 10,
"minimum": 0,
"type": "number"
"description": "Height of donor, in meters. Can be a range separated by a hyphen.",
"pattern": "^[0-9]+\\.?[0-9]*-?[0-9]*\\.?[0-9]*$",
"type": "string"
},
"is_living": {
"description": "Should be yes if donor is living at time of sample donation. Otherwise, should be no.",
Expand Down Expand Up @@ -109,10 +111,9 @@
}
},
"weight": {
"description": "Weight of donor in kilograms.",
"maximum": 1000,
"minimum": 0,
"type": "number"
"description": "Weight of donor, in kilograms. Can be a range separated by a hyphen.",
"pattern": "^[0-9]+\\.?[0-9]*-?[0-9]*\\.?[0-9]*$",
"type": "string"
}
},
"required": [
Expand Down

0 comments on commit 15d2f42

Please sign in to comment.