diff --git a/public/manifest.json b/public/manifest.json index ea86154..fea66a0 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "api": { "type": "openapi", - "url": "https://raw.githubusercontent.com/GithuBarry/chat-plugin-search-engine/main/public/openapi_2.json", + "url": "https://raw.githubusercontent.com/GithuBarry/chat-plugin-search-engine/main/public/openapi.json", "is_user_authenticated": false }, "auth": { diff --git a/public/openapi.json b/public/openapi.json index 9cce6f0..6926cb6 100644 --- a/public/openapi.json +++ b/public/openapi.json @@ -18,35 +18,35 @@ "post": { "summary": "Search Google and return top 10 results", "operationId": "searchGoogle", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "q" - ], - "properties": { - "q": { - "type": "string", - "example": "今天吃什么" - }, - "gl": { - "type": "string", - "description": "Google Geo location parameter", - "example": "cn" - }, - "hl": { - "type": "string", - "description": "Google Geo locale parameter", - "example": "zh-cn" - } - } - } - } + "parameters": [ + { + "in": "query", + "name": "q", + "schema": { + "type": "string" + }, + "required": true, + "description": "Search query string" + }, + { + "in": "query", + "name": "gl", + "schema": { + "type": "string" + }, + "required": false, + "description": "Google Geo location parameter" + }, + { + "in": "query", + "name": "hl", + "schema": { + "type": "string" + }, + "required": false, + "description": "Google Geo locale parameter" } - }, + ], "responses": { "200": { "description": "Successful search results", @@ -87,4 +87,4 @@ "url": "https://google.serper.dev" } ] -} +} \ No newline at end of file diff --git a/public/openapi_2.json b/public/openapi_2.json deleted file mode 100644 index 6926cb6..0000000 --- a/public/openapi_2.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "components": { - "securitySchemes": { - "apiAuth": { - "type": "apiKey", - "name": "X-API-KEY", - "in": "header" - } - } - }, - "info": { - "title": "Web Search", - "version": "1.0.0" - }, - "openapi": "3.0.0", - "paths": { - "/search": { - "post": { - "summary": "Search Google and return top 10 results", - "operationId": "searchGoogle", - "parameters": [ - { - "in": "query", - "name": "q", - "schema": { - "type": "string" - }, - "required": true, - "description": "Search query string" - }, - { - "in": "query", - "name": "gl", - "schema": { - "type": "string" - }, - "required": false, - "description": "Google Geo location parameter" - }, - { - "in": "query", - "name": "hl", - "schema": { - "type": "string" - }, - "required": false, - "description": "Google Geo locale parameter" - } - ], - "responses": { - "200": { - "description": "Successful search results", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "type": "string", - "description": "Top 10 search results", - "example": "\"title\": \"周末游推荐\",\n\"link\": \"https://www.example.com/destinations-for-weekends\",\n\"snippet\": \"周末去哪玩?周末旅游频道,精心推荐数百个周末游经典线路\",\n\"position\": 1" - } - } - } - } - } - } - }, - "security": [ - { - "apiAuth": [] - } - ] - } - } - }, - "security": [ - { - "apiAuth": [] - } - ], - "servers": [ - { - "url": "https://google.serper.dev" - } - ] -} \ No newline at end of file