File size: 1,785 Bytes
06b0d69
 
 
3424779
06b0d69
 
 
 
 
 
 
 
 
4423d13
06b0d69
 
 
8eecaf4
06b0d69
 
 
 
 
 
 
 
babab16
4423d13
06b0d69
 
 
8eecaf4
06b0d69
 
 
 
 
 
 
 
 
4423d13
06b0d69
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
EASY_TASKS = [
    {
        "id": "easy_auth",
        "description": "Access the protected resource at GET /mock_api/users to get a 200 OK. The current request is failing because the Authorization header is missing. Add 'Authorization: Bearer {demo_token}' to the headers.",
        "broken_request": {
            "method": "GET",
            "url": "/mock_api/users",
            "headers": {},
            "body": None,
            "query_params": {},
        },
        "expected_status": 200,
        "expected_schema": {"users": []},
        "max_steps": 10,
    },
    {
        "id": "easy_content_type",
        "description": "Create an item via POST /mock_api/items to get a 200 OK. The current request has the wrong Content-Type and is missing a body. Fix: set Content-Type to 'application/json' and add a JSON body with field 'name' set to any string (e.g. 'test_item').",
        "broken_request": {
            "method": "POST",
            "url": "/mock_api/items",
            "headers": {"Content-Type": "text/plain"},
            "body": None,
            "query_params": {},
        },
        "expected_status": 200,
        "expected_schema": {"item_id": "", "name": "", "created": True},
        "max_steps": 10,
    },
    {
        "id": "easy_query_param",
        "description": "Search for 'python' via GET /mock_api/search. The current request is missing the required 'q' query parameter. Add query_params: {\"q\": \"python\"} to fix it.",
        "broken_request": {
            "method": "GET",
            "url": "/mock_api/search",
            "headers": {},
            "body": None,
            "query_params": {},
        },
        "expected_status": 200,
        "expected_schema": {"results": [], "total": 0},
        "max_steps": 10,
    },
]