Skip to content

Conversation

@sergioestebance
Copy link

@sergioestebance sergioestebance commented Feb 2, 2026

Summary

Fix OpenAPI schema generation to correctly structure evaluator request bodies.

Problem

The API documentation showed incorrect request body structure:

{"input": "...", "output": "...", "settings": {...}}

But the actual API expects:

{
  "trace_id": "optional",
  "name": "optional", 
  "data": {"input": "...", "output": "..."},
  "settings": {...},
  "as_guardrail": false
}

Changes

  • Updated generateRequestSchema() in scripts/generate-openapi-evals.ts to:
    • Wrap evaluator fields (input, output, etc.) in data object
    • Add top-level optional fields: trace_id, name, as_guardrail
    • Mark data as required

Note

After merging, run npx tsx scripts/generate-openapi-evals.ts to regenerate api-reference/openapi-evals.json.

🤖 Generated with Claude Code

@sergioestebance sergioestebance force-pushed the fix/curl-data-wrapper branch 2 times, most recently from a772667 to 3930121 Compare February 2, 2026 18:16
@sergioestebance sergioestebance marked this pull request as ready for review February 2, 2026 18:18
The OpenAPI schema generator was missing the `data` wrapper that the
actual API expects for evaluator endpoints.

Before: `{"input": "...", "output": "...", "settings": {...}}`
After:  `{"data": {"input": "...", "output": "..."}, "settings": {...}}`

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants