Skip to content

Commit

Permalink
fixed schema definitions (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
theorm authored Oct 17, 2024
1 parent 2fd0647 commit bbebf2c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/schema/schemas/Article.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"description": "TODO"
},
"date": {
"$oneOf": [
"oneOf": [
{ "type": "string", "description": "The date of the article", "format": "date-time" },
{ "type": "null" }
]
Expand All @@ -110,7 +110,7 @@
"items": { "type": "string" }
},
"collections": {
"$oneOf": [
"oneOf": [
{ "type": "array", "items": { "type": "string" } },
{ "type": "array", "items": { "$ref": "./Collection.json" } }
]
Expand All @@ -119,7 +119,7 @@
"$ref": "./Newspaper.json"
},
"dataProvider": {
"$oneOf": [{ "type": "string", "description": "The provider article" }, { "type": "null" }]
"oneOf": [{ "type": "string", "description": "The provider article" }, { "type": "null" }]
},
"topics": {
"type": "array",
Expand Down
4 changes: 2 additions & 2 deletions src/schema/schemas/Newspaper.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"description": "Title of the newspaper"
},
"endYear": {
"$oneOf": [
"oneOf": [
{
"type": "integer",
"description": "Last available year of the newspaper articles"
Expand All @@ -54,7 +54,7 @@
]
},
"startYear": {
"$oneOf": [
"oneOf": [
{
"type": "integer",
"description": "First available year of the newspaper articles"
Expand Down
2 changes: 1 addition & 1 deletion src/schema/schemas/SearchFacet.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"description": "The number of buckets in the facet"
},
"buckets": {
"$oneOf": [
"oneOf": [
{
"type": "array",
"items": { "$ref": "./SearchFacetBucket.json" }
Expand Down
2 changes: 1 addition & 1 deletion src/schema/schemas/SearchFacetBucket.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"item": {
"description": "The item in the bucket. Particular objct schema depends on the facet type",
"$oneOf": [
"oneOf": [
{ "$ref": "./Newspaper.json" },
{ "$ref": "./Collection.json" },
{ "$ref": "./Entity.json" },
Expand Down
4 changes: 2 additions & 2 deletions src/schema/schemas/TextReusePassage.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
}
},
"offsetStart": {
"$oneOf": [
"oneOf": [
{
"type": "integer",
"description": "Offset of the passage in the article text",
Expand All @@ -77,7 +77,7 @@
]
},
"offsetEnd": {
"$oneOf": [
"oneOf": [
{
"type": "integer",
"description": "Offset of the passage in the article text",
Expand Down
2 changes: 1 addition & 1 deletion src/services/articles-search/schema/create/payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"description": "Type of the context item"
},
"parameters": {
"$oneOf": [
"oneOf": [
{ "$ref": "#/definitions/timeRangeContextParameters" },
{ "$ref": "#/definitions/itemContextParameters" }
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
"description": "Skip this many subitems. Default: 0"
}
},
"$oneOf": [{ "required": ["entityId"] }, { "required": ["mentionLabel"] }]
"oneOf": [{ "required": ["entityId"] }, { "required": ["mentionLabel"] }]
}

0 comments on commit bbebf2c

Please sign in to comment.