Skip to content

fix!: Remove support for nested maps and harden validation#196

Draft
dishaprakash wants to merge 2 commits intomainfrom
reject-nested-maps
Draft

fix!: Remove support for nested maps and harden validation#196
dishaprakash wants to merge 2 commits intomainfrom
reject-nested-maps

Conversation

@dishaprakash
Copy link
Contributor

  • Strict Schema Rules: Updated ValidateDefinition and ValidateType in types.go to explicitly reject nested maps and objects, enforcing flat parameter structures.

  • Delayed Validation: Moved the type validation of bound parameters to execution time (Invoke in tools.go).

  • Schema Retention: Added a boundParamSchemas map to the ToolboxTool struct to store parameter definitions for use during runtime validation.

  • OpenAPI Hardening: Updated schemaToMap in utils.go to safely process supported structures while rejecting nested map configurations.

  • Testing: Expanded types_test.go and client_test.go to thoroughly cover the new delayed validation and strict structural rules.

@dishaprakash dishaprakash requested a review from a team as a code owner March 4, 2026 11:27
@dishaprakash dishaprakash changed the title fix!: Remove support for nested maps fix!: Remove support for nested maps and harden validation Mar 4, 2026
@dishaprakash dishaprakash marked this pull request as draft March 4, 2026 17:19
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