Add strict validation to enforce single action per request across all tool schemas#80
Merged
viratatwebflow merged 3 commits intomainfrom Feb 16, 2026
Merged
Add strict validation to enforce single action per request across all tool schemas#80viratatwebflow merged 3 commits intomainfrom
viratatwebflow merged 3 commits intomainfrom
Conversation
- Changed the type of the body parameter to use z.infer with WebflowPageSchema for better type safety. - Extracted relevant fields (seo, openGraph, slug, title) from the body and constructed a new pageSettings object for cleaner updates. - Updated the updatePageSettings call to merge the new pageSettings with the existing body, ensuring a more structured request.
- Updated input schemas across multiple tools (cms, comments, components, deAsset, deComponents, deElement, dePages, deStyle) to ensure consistent structure and validation using zod. - Implemented strict validation and refined checks to enforce single action requirements in deAsset, deComponents, and dePages tools. - Enhanced descriptions and organization of schema properties for improved clarity and usability.
- Modified validation checks in various tools (cms, comments, components, deAsset, deComponents, deElement, dePages, deStyle, deVariable, enterprise, scripts, sites) to require at least one action instead of exactly one. - Updated error messages to reflect the new validation criteria, enhancing user guidance for input requirements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.strict()to Zod action schemas across all 13 tool files to reject unrecognized keys, preventing typos or invalid fields from being silently ignored.refine()validation to ensure each action entry contains at least one valid action, providing a clear error message when an empty object is passed