Open UnniKohonen opened 1 year ago
Excellent work!
The reconciliation API specification requires the usage of the identifierSpace field in the service manifest. Since Annif doesn't require entities to be in a specific URI space and doesn't have a way to extract this infomation from a project, the field is left empty for now.
I opened an issue about this problem: https://github.com/reconciliation-api/specs/issues/139
I will soon provide more detailed comments about the code.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
This PR adds a Reconciliation Service API endpoint to REST API as mentioned in #338. It allows reconciling against a project using the
/v1/projects/{project_id}/reconcile
API method. It also includes a suggest service for entities with the/v1/projects/{project_id}/suggest/entity
API method.The main reconciliation endpoint accepts
GET
andPOST
requests:GET
request with no parameters returns a service manifest.GET
request with a URL query parameterqueries
serialized as JSON returns a reconciliation result batch.POST
request with anapplication/x-www-form-urlencoded
parameterqueries
serialized as JSON returns a reconciliation result batch.Only the fields
query
andlimit
are supported in thequeries
objects. Reconciliation result objects contain the fieldsid
,name
,score
andmatch
. Reconciliation doesn't support types or properties for now.The reconciliation API specification requires the usage of the
identifierSpace
field in the service manifest. Since Annif doesn't require entities to be in a specific URI space and doesn't have a way to extract this information from a project, the field is left empty for now.The suggest service endpoint accepts
GET
requests and returns a suggest response. It supports theprefix
andcursor
parameters.Closes #338