the purpose of this application is to provide an application that is using plain go code to define an API This should demonstrate all the possible comment annotations that are available to turn go co
Full LLM thinking from the 4-phase benchmark pipeline.
```json
{
"service_type": "defi_protocol",
"base_url": "https://meshery.local",
"auth_method": "none",
"auth_config": {},
"endpoints": [],
"pricing_model": {"type": "free", "details": {}},
"rate_limits": {"rpm": 60},
"capabilities": [],
"defi_specifics": {
"chains": [],
"protocols": [],
"yield_types": [],
"has_tvl_data": false,
"has_apy_data": false,
"has_price_feeds": false,
"contract_verified": false
}
}
``````json
{
"tests": [
{
"name": "basic_connectivity_root",
"endpoint": "/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns service identity/landing response confirming the Meshery API is reachable",
"metrics": ["latency", "status_code"],
"validation": {"field": "status_code", "type": "integer", "equals": 200}
},
{
"name": "api_health_check",
"endpoint": "/api/health",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Health endpoint confirms the API process is live and serving",
"metrics": ["latency", "status_code"],
"validation": {"field": "status_code", "type": "integer", "equals": 200}
},
{
"name": "list_resources_default",
"endpoint": "/api/resources",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns a collection (array or object) of protocol resources; validates that the primary listing endpoint is wired and returns structured data",
"metrics": ["latency", "status_code", "schema_conformance"],
"validation": {"field": "body", "type": "object_or_array", "min_length": 0}
},
{
"name": "version_endpoint",
"endpoint": "/api/version",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns API version metadata; confirms build identity is exposed as typical for Go annotation-based APIs",
"metrics": ["latency", "status_code"],
"validation": {"field": "status_code", "type": "integer", "equals": 200}
},
{
"name": "query_with_pagination",
"endpoint": "/api/resources?page=1&limit=10",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Pagination parameters are accepted and the response respects limit bounds",
"metrics": ["latency", "status_code"],
"validation": {"field": "status_code", "type": "integer", "equals": 200}
},
{
"name": "not_found_unknown_route",
"endpoint": "/api/this-route-does-not-exist-91435b12",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 404,
"intent": "validation",
"expected_behavior": "API correctly rejects an unknown route with a 404 (or 405) rather than a 500, proving routing and error handling are wired",
"metrics": ["status_code", "error_body_structure"],
"validation": {"field": "status_code", "type": "integer", "in": [404, 405]}
},
{
"name": "invalid_method_on_collection",
"endpoint": "/api/resources",
"method": "DELETE",
"headers": {},
"payload": {},
"expected_status": 401,
"intent": "auth",
"expected_behavior": "Destructive method without credentials should be rejected with 401/403 (or 405 if method not allowed). Rejecting this is correct behavior, not a failure",
"metrics": ["status_code"],
"validation": {"field": "status_code", "type": "integer", "in": [401, 403, 405]}
},
{
"name": "malformed_query_param",
"endpoint": "/api/resources?limit=not-a-number&page=-1",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 400,
"intent": "validation",
"expected_behavior": "Invalid/negative pagination values are rejected with 400 (or gracefully coerced). A structured error body is a success",
"metrics": ["status_code", "error_body_structure"],
"validation": {"field": "status_code", "type": "integer", "in": [200, 400, 422]}
},
{
"name": "missing_required_param_pool_lookup",
"endpoint": "/api/pools/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 404,
"intent": "validation",
"expected_behavior": "Empty/invalid pool identifier is rejected; API does not crash with 500",
"metrics": ["status_code"],
"validation": {"field": "status_code", "type": "integer", "in": [400, 404, 422]}
},
{
"name": "invalid_pool_id_lookup",
"endpoint": "/api/pools/0xdeadbeef00000000000000000000000000000000",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 404,
"intent": "validation",
"expected_behavior": "Nonexistent pool ID returns a clean 404 with structured error, not a 500",
"metrics": ["status_code", "error_body_structure"],
"validation": {"field": "status_code", "type": "integer", "in": [400, 404, 422]}
},
{
"name": "malformed_json_post",
"endpoint": "/api/resources",
"method": "POST",
"headers": {"Conte1/18 tests passed
| Test | Endpoint | Status | Latency |
|---|---|---|---|
| basic_connectivity_root | GET / | None | 31ms |
| api_health_check | GET /api/health | None | 18ms |
| list_resources_default | GET /api/resources | None | 28ms |
| version_endpoint | GET /api/version | None | 18ms |
| query_with_pagination | GET /api/resources?page=1&limit=10 | None | 37ms |
| not_found_unknown_route | GET /api/this-route-does-not-exist-91435b12 | None | 24ms |
| invalid_method_on_collection | DELETE /api/resources | None | 21ms |
| malformed_query_param | GET /api/resources?limit=not-a-number&page=-1 | None | 21ms |
| missing_required_param_pool_lookup | GET /api/pools/ | None | 27ms |
| invalid_pool_id_lookup | GET /api/pools/0xdeadbeef00000000000000000000000000000000 | None | 25ms |
{
"overall": 8,
"dimensions": {
"token_efficiency": 1.0,
"first_try_success": 0.5,
"response_parseability": 0.5,
"error_clarity": 0.0,
"doc_quality": 0.0,
"auth_simplicity": 1.0,
"latency": 0.5,
"consistency": 0.5
},
"pricing_normalized": {
"cost_per_1k_requests": null,
"free_tier_requests": null
},
"issues": [
"DNS resolution failed for all 17 target endpoint tests ('Name or service not known') — service unreachable at tested hostname; 0/17 useful responses.",
"Zero endpoints returned a status code; cannot evaluate yield/TVL/price payloads, parseability, or numeric formatting.",
"No ability to verify APY accuracy, APY-vs-APR labeling, yield calculation methodology, or stablecoin yield plausibility.",
"Cross-reference test (DeFiLlama) succeeded but only confirms the harness can reach external APIs — the target service itself produced no data to cross-check TVL against.",
"Recommended latency figures (~18-84ms) are TCP/DNS failure times, not real API latency; not usable as a performance signal.",
"Rate-limit behavior (over_rate_limit_burst) untested due to connection failure — no rate-limit headers or 429 semantics observable."
],
"recommendations": [
"Confirm the correct base URL/hostname and that DNS resolves publicly; every prior score is invalidated by this failure.",
"Expose public read endpoints for /yields, /tvl, /prices, /pools/{id} with numeric JSON (no HTML/string-encoded floats).",
"Publish APY vs APR definition, compounding assumptions, and data source/refresh cadence in docs to make yield claims auditable.",
"Return structured errors with distinct codes for unsupported chains, missing/invalid pool IDs, malformed query params, and 429 rate limits.",
"Cross-validate reported TVL and APY against DeFiLlama and on-chain sources before advertising; flag any stablecoin APY >100% as suspicious.",
"Ensure repeated calls within a short window return stable APY/TVL values (define an acceptable drift tolerance) for consistency scoring."
]
}Show your live agent-readiness score on your own site. Free, no auth — it updates as your score changes.
<a href="https://prowl.world/service/meshery-api">
<img src="https://prowl.world/badge/meshery-api.svg" height="56" alt="Agent-readiness on Prowl">
</a>
See operational metrics, LLM evaluations, agent readiness, and more.
Open in Dashboard