Skip to content

Conversation

shoummu1
Copy link
Collaborator

📌 Summary
This PR updates the admin UI’s input parser logic to support array schemas defined using anyOf (e.g., lists of int or float). Previously, primitive array values submitted via the UI failed validation with errors like:
Input validation error: '3' is not valid under any of the given schemas

✅ Changes Made

  1. Replaced strict prop.items.type check with anyOf-aware logic
  2. Parsed array values based on schema-supported types (number, Boolean, object)
  3. Added type-safe conversion with fallback for raw values
  4. Improved error handling and messaging for invalid formats

🧪 Test Plan

  1. Tested with create-line-chart tool using numeric arrays (x and y)
  2. Validated full submission without manual array manipulation

🔗 Related Issues
Closes #620

Signed-off-by: Shoumi <[email protected]>
@shoummu1 shoummu1 requested a review from crivetimihai as a code owner July 31, 2025 08:28
Signed-off-by: Shoumi <[email protected]>
Copy link
Collaborator

@madhav165 madhav165 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected. Merging since test, doctest and smoketest also passed.

@madhav165 madhav165 merged commit 27fbed4 into main Jul 31, 2025
37 checks passed
@madhav165 madhav165 deleted the fix-array-input-parsing branch July 31, 2025 10:34
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]: Test tool UI passes array inputs as strings
2 participants