Skip to content

Commit

Permalink
Update OpenAPI Schema and Testing Suite (#57)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
jzanecook and GitHub Actions committed Sep 11, 2023
1 parent 68e90f6 commit 4b28774
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,5 @@ cython_debug/

.idea/

# Testing Suite HTML Reports
report.html
2 changes: 1 addition & 1 deletion docs/src/app/endpoints/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ curl --request POST http://localhost:8000/agent/tasks

---

## List Agent Tasks I Ds {{ tag: 'GET', label: '/agent/tasks' }}
## List Agent Tasks {{ tag: 'GET', label: '/agent/tasks' }}
<Row>
<Col>
List all tasks that have been created for the agent.
Expand Down
2 changes: 1 addition & 1 deletion schemas/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
]
},
"get": {
"operationId": "listAgentTasksIDs",
"operationId": "listAgentTasks",
"summary": "List all tasks that have been created for the agent.",
"parameters": [
{
Expand Down
2 changes: 1 addition & 1 deletion schemas/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ paths:
tags:
- agent
get:
operationId: listAgentTasksIDs
operationId: listAgentTasks
summary: List all tasks that have been created for the agent.
parameters:
- name: current_page
Expand Down
2 changes: 1 addition & 1 deletion testing_suite/contract_tests_env.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
{
"key": "env-openapi-json-url",
"value": "https://raw.githubusercontent.com/merwanehamadi/agent-protocol/main/openapi.json",
"value": "https://raw.githubusercontent.com/AI-Engineers-Foundation/agent-protocol/main/schemas/openapi.json",
"type": "default",
"enabled": true
},
Expand Down
15 changes: 0 additions & 15 deletions testing_suite/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,6 @@ Running the tests, this might take a while. Please wait...
EOF

newman run https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/testing_suite/agent_protocol_v0.4.json \
--env-var "url=$URL" \
-r htmlextra \
--reporter-htmlextra-export report.html \
--reporter-htmlextra-title "Agent Protocol Tests"

agent_protocol_tests_results=$?

if [[ "$OSTYPE" == "darwin"* ]]; then
open report.html
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
xdg-open report.html
fi
echo "If the report wasn't generated, please open the report.html file in your browser."

newman run https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/testing_suite/contract_tests.json \
-e https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/testing_suite/contract_tests_env.json \
--env-var "env-openapi-json-url=https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/schemas/openapi.json" \
Expand Down

0 comments on commit 4b28774

Please sign in to comment.