Skip to content

Commit

Permalink
Fix status schema to allow null values and "types" prop (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Nov 10, 2020
1 parent 1129fa4 commit 8ab420e
Showing 1 changed file with 39 additions and 26 deletions.
65 changes: 39 additions & 26 deletions status.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,28 @@
}
}
]
},
"uriOrNull": {
"oneOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"stringOrNull": {
"$comment": "format: uri is not used here because something like ?search={searchTerms} will not pass validation.",
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"properties": {
Expand All @@ -52,68 +74,59 @@
},
"schemes": {
"description": "API URL for concept schemes",
"type": "string",
"format": "uri"
"$ref": "#/definitions/uriOrNull"
},
"top": {
"description": "API URL for top concepts",
"type": "string",
"format": "uri"
"$ref": "#/definitions/uriOrNull"
},
"concepts": {
"description": "API URL for concepts",
"type": "string",
"format": "uri"
"$ref": "#/definitions/uriOrNull"
},
"voc-suggest": {
"description": "API URL for vocabulary suggest",
"$comment": "format: uri is not used here because something like ?search={searchTerms} will not pass validation.",
"type": "string"
"$ref": "#/definitions/stringOrNull"
},
"voc-search": {
"description": "API URL for vocabulary search",
"$comment": "format: uri is not used here because something like ?search={searchTerms} will not pass validation.",
"type": "string"
"$ref": "#/definitions/stringOrNull"
},
"data": {
"description": "API URL for data",
"type": "string",
"format": "uri"
"$ref": "#/definitions/uriOrNull"
},
"narrower": {
"description": "API URL for narrower concepts",
"type": "string",
"format": "uri"
"$ref": "#/definitions/uriOrNull"
},
"ancestors": {
"description": "API URL for concept ancestors",
"type": "string",
"format": "uri"
"$ref": "#/definitions/uriOrNull"
},
"suggest": {
"description": "API URL for concept suggest",
"$comment": "format: uri is not used here because something like ?search={searchTerms} will not pass validation.",
"type": "string"
"$ref": "#/definitions/stringOrNull"
},
"search": {
"description": "API URL for concept search",
"$comment": "format: uri is not used here because something like ?search={searchTerms} will not pass validation.",
"type": "string"
"$ref": "#/definitions/stringOrNull"
},
"concordances": {
"description": "API URL for concordances",
"type": "string",
"format": "uri"
"$ref": "#/definitions/uriOrNull"
},
"mappings": {
"description": "API URL for mappings",
"type": "string",
"format": "uri"
"$ref": "#/definitions/uriOrNull"
},
"annotations": {
"description": "API URL for annotations",
"type": "string",
"format": "uri"
"$ref": "#/definitions/uriOrNull"
},
"types": {
"description": "API URL for types",
"$ref": "#/definitions/uriOrNull"
}
},
"additionalProperties": false
Expand Down

0 comments on commit 8ab420e

Please sign in to comment.