Skip to content

fix(macros): #[tool] now emits array/object schemas and rejects unsupported types#244

Merged
Fullstop000 merged 1 commit into
masterfrom
fix/tool-macro-json-schema
Jul 3, 2026
Merged

fix(macros): #[tool] now emits array/object schemas and rejects unsupported types#244
Fullstop000 merged 1 commit into
masterfrom
fix/tool-macro-json-schema

Conversation

@Fullstop000

Copy link
Copy Markdown
Owner

Closes #235.

#[tool] previously mapped every non-scalar parameter type to "string" in the generated JSON schema. This fix:

  • Vec<T> / [T; N]{"type": "array", "items": ...}
  • HashMap / BTreeMap and structs/enums → {"type": "object"}
  • References, slices, tuples and other unsupported types are rejected at compile time instead of silently degrading to "string".

Added integration tests in ignis/tests/tool_macro.rs and a compile_fail doctest.

Checklist:

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • cargo build --release
  • Secret scan clean

@Fullstop000
Fullstop000 merged commit cec9ae6 into master Jul 3, 2026
6 checks passed
@Fullstop000
Fullstop000 deleted the fix/tool-macro-json-schema branch July 3, 2026 16:18
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.

bug(macros): #[tool] maps non-scalar param types to JSON-schema "string"

1 participant