Conversation
schemars emits format values like "uint64", "int32", and "double" for Rust numeric types. These are not defined by the JSON Schema spec and cause noisy warnings in strict validators such as ajv (used by OpenCode). Add a RecursiveTransform that strips these non-standard format annotations from all MCP request/response types that contain numeric fields. Closes #113
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughA private helper function is introduced to strip non-standard numeric JSON Schema format annotations from schemas. This function is applied via RecursiveTransform to multiple public schema-annotated structs during schema generation, while preserving standard formats. Unit tests verify the stripping behavior and format retention. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
schemars emits format values like "uint64", "int32", and "double" for Rust numeric types. These are not defined by the JSON Schema spec and cause noisy warnings in strict validators such as ajv (used by OpenCode).
Add a RecursiveTransform that strips these non-standard format annotations from all MCP request/response types that contain numeric fields.
Closes #113
Summary by CodeRabbit