From de3e9706eba06526bf60d40b5305d19cfcf07d15 Mon Sep 17 00:00:00 2001 From: Suraj Jha Date: Mon, 18 Aug 2025 14:01:37 +0545 Subject: [PATCH] update: add new endpoint mcp for custom templates list --- servers/fastapi/openai_spec.json | 415 ++++++++++++++++++++----------- 1 file changed, 274 insertions(+), 141 deletions(-) diff --git a/servers/fastapi/openai_spec.json b/servers/fastapi/openai_spec.json index f73975cf..4a9e5e08 100644 --- a/servers/fastapi/openai_spec.json +++ b/servers/fastapi/openai_spec.json @@ -1,43 +1,42 @@ { - "openapi": "3.1.0", - "info": { - "title": "FastAPI", - "version": "0.1.0" - }, - "paths": { - "/api/v1/ppt/presentation/generate": { - "post": { - "tags": ["Presentation"], - "summary": "Generate Presenatation MCP", - "operationId": "presentation_generator", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_generate_presentation_api_api_v1_ppt_presentation_generate_post" - } + "openapi": "3.1.0", + "info": { + "title": "FastAPI", + "version": "0.1.0" + }, + "paths": { + "/api/v1/ppt/presentation/generate": { + "post": { + "tags": ["Presentation"], + "summary": "Returns base URL of generated presentation's PDF or PPTX.", + "operationId": "generate_presentation", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_generate_presentation_api_api_v1_ppt_presentation_generate_post" } - }, - "required": true + } }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PresentationPathAndEditPath" - } + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PresentationPathAndEditPath" } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" } } } @@ -45,116 +44,250 @@ } } }, - "components": { - "schemas": { - "Body_generate_presentation_api_api_v1_ppt_presentation_generate_post": { - "properties": { - "prompt": { - "type": "string", - "title": "Prompt" - }, - "n_slides": { - "type": "integer", - "title": "N Slides", - "default": 8 - }, - "language": { - "type": "string", - "title": "Language", - "default": "English" - }, - "template": { - "type": "string", - "title": "Template", - "default": "general" - }, - "files": { - "anyOf": [ - { - "items": { - "type": "string", - "format": "binary" - }, - "type": "array" - }, - { - "type": "null" + "/api/v1/ppt/template-management/summary": { + "get": { + "tags": ["template-management"], + "summary": "Get all presentations with layout counts", + "description": "Returns a list of extra custom templates available for presenation creation.", + "operationId": "templates_list", + "responses": { + "200": { + "description": "Presentations summary retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPresentationSummaryResponse" } - ], - "title": "Files" - }, - "export_as": { - "type": "string", - "enum": ["pptx", "pdf"], - "title": "Export As", - "default": "pptx" + } } }, - "type": "object", - "required": ["prompt"], - "title": "Body_generate_presentation_api_api_v1_ppt_presentation_generate_post" - }, - "PresentationPathAndEditPath": { - "properties": { - "presentation_id": { - "type": "string", - "title": "Presentation Id" - }, - "path": { - "type": "string", - "title": "Path" - }, - "edit_path": { - "type": "string", - "title": "Edit Path" + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - }, - "type": "object", - "required": ["presentation_id", "path", "edit_path"], - "title": "PresentationPathAndEditPath" - }, - "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" + } } } } - } \ No newline at end of file + }, + "components": { + "schemas": { + "Body_generate_presentation_api_api_v1_ppt_presentation_generate_post": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt" + }, + "n_slides": { + "type": "integer", + "title": "N Slides", + "default": 8 + }, + "language": { + "type": "string", + "title": "Language", + "default": "English" + }, + "template": { + "type": "string", + "title": "Template", + "default": "general" + }, + "files": { + "anyOf": [ + { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Files" + }, + "export_as": { + "type": "string", + "enum": ["pptx", "pdf"], + "title": "Export As", + "default": "pptx" + } + }, + "type": "object", + "required": ["prompt"], + "title": "Body_generate_presentation_api_api_v1_ppt_presentation_generate_post" + }, + "PresentationPathAndEditPath": { + "properties": { + "presentation_id": { + "type": "string", + "title": "Presentation Id" + }, + "path": { + "type": "string", + "title": "Path" + }, + "edit_path": { + "type": "string", + "title": "Edit Path" + } + }, + "type": "object", + "required": ["presentation_id", "path", "edit_path"], + "title": "PresentationPathAndEditPath" + }, + "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" + }, + "GetPresentationSummaryResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success" + }, + "presentations": { + "items": { + "$ref": "#/components/schemas/PresentationSummary" + }, + "type": "array", + "title": "Presentations" + }, + "total_presentations": { + "type": "integer", + "title": "Total Presentations" + }, + "total_layouts": { + "type": "integer", + "title": "Total Layouts" + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + } + }, + "type": "object", + "required": ["success", "presentations", "total_presentations", "total_layouts"], + "title": "GetPresentationSummaryResponse" + }, + "PresentationSummary": { + "properties": { + "presentation_id": { + "type": "string", + "title": "Presentation Id" + }, + "layout_count": { + "type": "integer", + "title": "Layout Count" + }, + "last_updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Last Updated At" + }, + "template": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Template" + } + }, + "type": "object", + "required": ["presentation_id", "layout_count"], + "title": "PresentationSummary" + }, + "ErrorResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "default": false + }, + "detail": { + "type": "string", + "title": "Detail" + }, + "error_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Code" + } + }, + "type": "object", + "required": ["detail"], + "title": "ErrorResponse" + } + } + } +} \ No newline at end of file