Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: string validation in variable input schema (#603)
# Background When trying to input a `jsonPath` value type in standard transformer page (for variable input & feast table input), the value that is passed to the yup validation is type of object (e.g. `{ "jsonPath": "$.id" }`), instead of just the string value of jsonPath (`$.id`) inputted in the form. This prevent user to submit the form when their actual input is valid. <img width="660" alt="Screenshot 2024-08-29 at 13 18 40" src="https://github.com/user-attachments/assets/8ab9bbd3-c92f-46fa-b3aa-49b4c5ce938c"> <img width="530" alt="Screenshot 2024-08-29 at 13 40 48" src="https://github.com/user-attachments/assets/d09d13c8-15ca-405e-bcb8-3cc48333ad91"> # Modifications Use a custom yup test function to validate `value`; if the value passed is type of object & has the field of `jsonPath`, it will compare the `jsonPath` value to the original schema; else can just compare the original value to the yup schema. # Tests # Checklist - [x] Added PR label - [ ] Added unit test, integration, and/or e2e tests - [x] Tested locally - [ ] Updated documentation - [ ] Update Swagger spec if the PR introduce API changes - [ ] Regenerated Golang and Python client if the PR introduces API changes # Release Notes <!-- Does this PR introduce a user-facing change? If no, just write "NONE" in the release-note block below. If yes, a release note is required. Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information about release notes, see kubernetes' guide here: http://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note fix variable input validation in transformer config ui page ```
- Loading branch information