Files
smartguide/webapp/openapi.json
T
Mats Paul Tončik a3088062f0
aiis/pipeline/head There was a failure building this commit
Finished person collaboration graph prototype
2026-05-28 10:28:08 +02:00

183 lines
5.6 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Innovation Search Engine API",
"description": "API for the Innovation Search Engine (INSE) application.",
"version": "0.1.0"
},
"servers": [
{
"url": "http://localhost:8000",
"description": "Local development server"
}
],
"paths": {
"/api/person/network/{raw_user_id}": {
"get": {
"tags": ["Person Network"],
"summary": "Get a person's collaboration network.",
"description": "Returns a person's collaboration network based on their works and co-authors.",
"operationId": "getCollaborationNetwork",
"parameters": [
{
"name": "raw_user_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "The raw user ID of the person.",
"title": "Raw User Id"
},
"description": "The raw user ID of the person."
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CollaborationNetwork"
}
}
}
},
"404": { "description": "Person not found" },
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
}
}
}
}
}
}
},
"components": {
"schemas": {
"CollaborationNetwork": {
"properties": {
"raw_person_id": {
"type": "string",
"title": "Raw Person ID",
"description": "The raw person ID of the person whose collaboration network this is."
},
"nodes": {
"items": {
"$ref": "#/components/schemas/CollaborationNetworkNode"
},
"type": "array",
"title": "Collaboration Network Nodes",
"description": "The nodes in the collaboration network."
},
"edges": {
"items": {
"$ref": "#/components/schemas/CollaborationNetworkEdge"
},
"type": "array",
"title": "Collaboration Network Edges",
"description": "The edges in the collaboration network."
},
"works": {
"items": { "$ref": "#/components/schemas/CollaborationWork" },
"type": "array",
"title": "Collaboration Works",
"description": "The works that represent the collaborations in the collaboration network."
}
},
"type": "object",
"required": ["raw_person_id", "nodes", "edges", "works"],
"title": "CollaborationNetwork"
},
"CollaborationNetworkEdge": {
"properties": {
"raw_source_person_id": {
"type": "string",
"title": "Source Raw Person ID",
"description": "The raw person ID of the source person."
},
"raw_target_person_id": {
"type": "string",
"title": "Target Raw Person ID",
"description": "The raw person ID of the target person."
},
"raw_work_ids": {
"items": { "type": "string" },
"type": "array",
"title": "Work IDs",
"description": "The list of work IDs that represent the collaborations between the two persons."
}
},
"type": "object",
"required": [
"raw_source_person_id",
"raw_target_person_id",
"raw_work_ids"
],
"title": "CollaborationNetworkEdge"
},
"CollaborationNetworkNode": {
"properties": {
"raw_person_id": {
"type": "string",
"title": "Raw Person ID",
"description": "The raw person ID of the person."
},
"display_name": {
"type": "string",
"title": "Display Name",
"description": "The display name of the person."
}
},
"type": "object",
"required": ["raw_person_id", "display_name"],
"title": "CollaborationNetworkNode"
},
"CollaborationWork": {
"properties": {
"raw_work_id": {
"type": "string",
"title": "Raw Work ID",
"description": "The raw work ID of the work."
},
"display_title": {
"type": "string",
"title": "Display Title",
"description": "The display title of the work."
}
},
"type": "object",
"required": ["raw_work_id", "display_title"],
"title": "CollaborationWork"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": { "$ref": "#/components/schemas/ValidationError" },
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"ValidationError": {
"properties": {
"loc": {
"items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] },
"type": "array",
"title": "Location"
},
"msg": { "type": "string", "title": "Message" },
"type": { "type": "string", "title": "Error Type" }
},
"type": "object",
"required": ["loc", "msg", "type"],
"title": "ValidationError"
}
}
}
}