{
  "version": "1.0",
  "meta": {
    "name": "Items Search Test",
    "description": "List, search, pagination test",
    "tags": ["items", "search", "stats"]
  },
  "config": {
    "baseUrl": "https://api.sam.kr/api/v1",
    "timeout": 30000,
    "stopOnFailure": false
  },
  "variables": {
    "searchKeyword": "part"
  },
  "steps": [
    {
      "id": "list_items",
      "name": "List All Items",
      "method": "GET",
      "endpoint": "/items",
      "expect": {
        "status": [200],
        "jsonPath": {
          "$.success": true
        }
      },
      "extract": {
        "totalCount": "$.meta.total"
      }
    },
    {
      "id": "list_paginated",
      "name": "List with Pagination",
      "dependsOn": ["list_items"],
      "method": "GET",
      "endpoint": "/items?page=1&per_page=10",
      "expect": {
        "status": [200],
        "jsonPath": {
          "$.success": true
        }
      }
    },
    {
      "id": "search_keyword",
      "name": "Search by Keyword",
      "dependsOn": ["list_paginated"],
      "method": "GET",
      "endpoint": "/items/search?keyword={{variables.searchKeyword}}",
      "expect": {
        "status": [200],
        "jsonPath": {
          "$.success": true
        }
      }
    },
    {
      "id": "search_type",
      "name": "Filter by Type",
      "dependsOn": ["search_keyword"],
      "method": "GET",
      "endpoint": "/items/search?item_type=PRODUCT",
      "expect": {
        "status": [200],
        "jsonPath": {
          "$.success": true
        }
      }
    },
    {
      "id": "get_stats",
      "name": "Get Statistics",
      "dependsOn": ["search_type"],
      "method": "GET",
      "endpoint": "/items/stats",
      "expect": {
        "status": [200],
        "jsonPath": {
          "$.success": true
        }
      }
    }
  ]
}