added
This commit is contained in:
commit
4eaec52904
55 files changed
+5044
No files matched your search
@@ -0,0 +1,235 @@
|
||||
{
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "Structured Media Read API \u00e2\u20ac\u201d Proposed",
|
||||
"version": "0.2.0",
|
||||
"description": "Design contract only. No deployed API. Adapters serve complete validated public releases."
|
||||
},
|
||||
"x-implementation-status": "design-only",
|
||||
"paths": {
|
||||
"/media": {
|
||||
"get": {
|
||||
"operationId": "list_media",
|
||||
"summary": "List recording metadata and artifact routes",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Approved export data",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../schemas/ai-index.schema.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"404": {
|
||||
"description": "Unknown or withdrawn resource"
|
||||
},
|
||||
"503": {
|
||||
"description": "No validated release available"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/search": {
|
||||
"get": {
|
||||
"operationId": "search_media",
|
||||
"summary": "Search reviewed chunks and Q&A",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "q",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"default": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Approved export data",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"results"
|
||||
],
|
||||
"properties": {
|
||||
"results": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"media_id",
|
||||
"type",
|
||||
"id",
|
||||
"score",
|
||||
"text",
|
||||
"rights",
|
||||
"citations"
|
||||
],
|
||||
"properties": {
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"chunks",
|
||||
"qa"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$"
|
||||
},
|
||||
"score": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"text": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"rights": {
|
||||
"$ref": "../schemas/media.schema.json#/properties/rights"
|
||||
},
|
||||
"citations": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "../schemas/chunks.schema.json#/properties/chunks/items/properties/citations/items"
|
||||
},
|
||||
{
|
||||
"$ref": "../schemas/qa.schema.json#/properties/qa/items/properties/evidence/items"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"404": {
|
||||
"description": "Unknown or withdrawn resource"
|
||||
},
|
||||
"503": {
|
||||
"description": "No validated release available"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/media/{media_id}": {
|
||||
"get": {
|
||||
"operationId": "get_media",
|
||||
"summary": "Fetch one catalog metadata record",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "media_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Approved export data",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../schemas/ai-index.schema.json#/properties/items/items"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"404": {
|
||||
"description": "Unknown or withdrawn resource"
|
||||
},
|
||||
"503": {
|
||||
"description": "No validated release available"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/media/{media_id}/chunks/{chunk_id}": {
|
||||
"get": {
|
||||
"operationId": "get_media_chunk",
|
||||
"summary": "Fetch a conceptual chunk with cited transcript evidence",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "media_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "chunk_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Approved export data",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../schemas/chunks.schema.json#/properties/chunks/items"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"404": {
|
||||
"description": "Unknown or withdrawn resource"
|
||||
},
|
||||
"503": {
|
||||
"description": "No validated release available"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user