Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the format of reconciliation queries, responses and data extension responses #92

Merged
merged 4 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,38 @@
}
}
],
"rows": {
"10662041X": {
"variantName": [
"rows": [
{
"id": "10662041X",
"properties": [
{
"label": "Stryi-Leitgeb, Gerda"
}
],
"geographicAreaCode": [
"id": "variantName",
"values": [
{
"label": "Stryi-Leitgeb, Gerda"
}
]
},
{
"str": "http://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-DE",
"label": "Deutschland"
}
],
"professionOrOccupation": [
"id": "geographicAreaCode",
"values": [
{
"str": "http://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-DE",
"label": "Deutschland"
}
]
},
{
"id": "4037223-6",
"name": "Malerin",
"type": "Person"
"id": "professionOrOccupation",
"values": [
{
"id": "4037223-6",
"name": "Malerin",
"type": "Person"
}
]
}
]
}
}
}
]
}
112 changes: 71 additions & 41 deletions latest/examples/data-extension-response/valid/example-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,60 +22,90 @@
"service": "https://www.wikidata.org/api/reconcile"
}
],
"rows": {
"10662041X": {
"variantName": [
"rows": [
{
"id": "10662041X",
"properties": [
{
"str": "Stryi-Leitgeb, Gerda"
"id": "variantName",
"values": [
{
"str": "Stryi-Leitgeb, Gerda"
},
{
"str": "Leitgeb, Gerda Stryi-"
}
]
},
{
"str": "Leitgeb, Gerda Stryi-"
}
],
"geographicAreaCode": [
{
"str": "http://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-DE"
}
],
"professionOrOccupation": [
{
"id": "4037223-6",
"name": "Malerin",
"description": "Beruf"
"id": "geographicAreaCode",
"values": [
{
"str": "http://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-DE"
}
]
},
{
"id": "4033430-2",
"name": "Künstlerin"
}
],
"wikidataId": [
"id": "professionOrOccupation",
"values": [
{
"id": "4037223-6",
"name": "Malerin",
"description": "Beruf"
},
{
"id": "4033430-2",
"name": "Künstlerin"
}
]
},
{
"id": "Q3874347",
"name": "Gerda Stryi-Leitgeb"
"id": "wikidataId",
"values": [
{
"id": "Q3874347",
"name": "Gerda Stryi-Leitgeb"
}
]
}
]
},
"1064905412": {
"variantName": [
{}
],
"geographicAreaCode": [
{
"id": "1064905412",
"properties": [
{
"str": "http://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-DE"
}
],
"professionOrOccupation": [
"id": "variantName",
"values": [
{}
]
},
{
"id": "4002844-6",
"name": "Architekt"
}
],
"wikidataId": [
"id": "geographicAreaCode",
"values": [
{
"str": "http://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-DE"
}
]
},
{
"id": "professionOrOccupation",
"values": [
{
"id": "4002844-6",
"name": "Architekt"
}
]
},
{
"id": "Q3874347",
"name": "Gerda Stryi-Leitgeb"
"id": "wikidataId",
"values": [
{
"id": "Q3874347",
"name": "Gerda Stryi-Leitgeb"
}
]
}
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"q1": {
"properties": []
}
"queries": [
{
"properties": []
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"q1": {
"limit": 1
}
"queries": [
{
"limit": 1
}
]
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
{
"q0": {
"query": "Christel Hanewinckel",
"type": "DifferentiatedPerson",
"limit": 5,
"props": [
{
"pid": "professionOrOccupation",
"v": "Politik*"
},
{
"pid": "affiliation",
"v": "http://d-nb.info/gnd/2022139-3"
}
],
"type_strict": "should"
},
"q1": {
"query": "Franz Thönnes",
"type": "DifferentiatedPerson",
"limit": 5,
"props": [
{
"pid": "professionOrOccupation",
"v": "Politik*"
},
{
"pid": "affiliation",
"v": "http://d-nb.info/gnd/2022139-3"
}
],
"type_strict": "should"
}
}
"queries": [
{
"query": "Christel Hanewinckel",
"type": "DifferentiatedPerson",
"limit": 5,
"props": [
{
"pid": "professionOrOccupation",
"v": "Politik*"
},
{
"pid": "affiliation",
"v": "http://d-nb.info/gnd/2022139-3"
}
],
"type_strict": "should"
},
{
"query": "Franz Thönnes",
"type": "DifferentiatedPerson",
"limit": 5,
"props": [
{
"pid": "professionOrOccupation",
"v": "Politik*"
},
{
"pid": "affiliation",
"v": "http://d-nb.info/gnd/2022139-3"
}
],
"type_strict": "should"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"properties": [{"pid":"uid", "v": "27eb892afbb2"}]
},
{
"properties": [{"pid":"uid", "v": "ab09da9dd37e"}]
}
]
11 changes: 11 additions & 0 deletions latest/examples/reconciliation-query-batch/invalid/old-format.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"q0": {
"query": "Christel Hanewinckel",
"limit": 5
},
"q1": {
"query": "Franz Thönnes",
"type": "DifferentiatedPerson",
"limit": 5
}
}
68 changes: 35 additions & 33 deletions latest/examples/reconciliation-query-batch/valid/example-full.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
{
"q0": {
"query": "Christel Hanewinckel",
"type": "DifferentiatedPerson",
"limit": 5,
"properties": [
{
"pid": "professionOrOccupation",
"v": "Politik*"
},
{
"pid": "affiliation",
"v": "http://d-nb.info/gnd/2022139-3"
}
],
"type_strict": "should"
},
"q1": {
"query": "Franz Thönnes",
"type": "DifferentiatedPerson",
"limit": 5,
"properties": [
{
"pid": "professionOrOccupation",
"v": "Politik*"
},
{
"pid": "affiliation",
"v": "http://d-nb.info/gnd/2022139-3"
}
],
"type_strict": "should"
}
}
"queries": [
{
"query": "Christel Hanewinckel",
"type": "DifferentiatedPerson",
"limit": 5,
"properties": [
{
"pid": "professionOrOccupation",
"v": "Politik*"
},
{
"pid": "affiliation",
"v": "http://d-nb.info/gnd/2022139-3"
}
],
"type_strict": "should"
},
{
"query": "Franz Thönnes",
"type": "DifferentiatedPerson",
"limit": 5,
"properties": [
{
"pid": "professionOrOccupation",
"v": "Politik*"
},
{
"pid": "affiliation",
"v": "http://d-nb.info/gnd/2022139-3"
}
],
"type_strict": "should"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"q1": {
"query": "Hans-Eberhard Urbaniak"
},
"q2": {
"query": "Ernst Schwanhold"
}
}
"queries": [
{
"query": "Hans-Eberhard Urbaniak"
},
{
"query": "Ernst Schwanhold"
}
]
}
Loading