langchain/tests/unit_tests/tools/openapi/test_specs/freetv-app/apispec.json
Harrison Chase 26314d7004
Harrison/openapi parser (#2461)
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2023-04-05 22:19:09 -07:00

100 lines
2.8 KiB
JSON

{
"openapi": "3.0.1",
"info": {
"title": "News Plugin",
"description": "A plugin that allows the user to obtain and summary latest news using ChatGPT. If you do not know the user's username, ask them first before making queries to the plugin. Otherwise, use the username \"global\".",
"version": "v1"
},
"servers": [
{
"url": "https://staging2.freetv-app.com"
}
],
"paths": {
"/services": {
"get": {
"summary": "Query the latest news",
"description": "Get the current latest news to user",
"operationId": "getLatestNews",
"parameters": [
{
"in": "query",
"name": "mobile",
"schema": {
"type": "integer",
"enum": [
1
]
},
"required": true
},
{
"in": "query",
"name": "funcs",
"schema": {
"type": "string",
"enum": [
"getLatestNewsForChatGPT"
]
},
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"ApiResponse": {
"title": "ApiResponse",
"required": [
"getLatestNewsForChatGPT"
],
"type": "object",
"properties": {
"getLatestNewsForChatGPT": {
"title": "Result of Latest News",
"type": "array",
"items": {
"$ref": "#/components/schemas/NewsItem"
},
"description": "The list of latest news."
}
}
},
"NewsItem": {
"type": "object",
"properties": {
"ref": {
"title": "News Url",
"type": "string"
},
"title": {
"title": "News Title",
"type": "string"
},
"thumbnail": {
"title": "News Thumbnail",
"type": "string"
},
"created": {
"title": "News Published Time",
"type": "string"
}
}
}
}
}
}