apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

refactor(validation): remove unused zOneOf helper

Open Jaswanth-arjun opened this issue 8 months ago • 2 comments

Problem

zOneOf helper was reported to have incorrect behavior, but it is not used anywhere in the codebase.

Solution

Removed the unused helper function from src/utils/zod.ts.

Result

Improves code maintainability and removes dead code.

Jaswanth-arjun avatar Mar 20 '26 06:03 Jaswanth-arjun

Your edits go beyond the scope you claimed. Please check and remove any unnecessary parts.

bzp2010 avatar Mar 21 '26 12:03 bzp2010

Thanks for the review. @bzp2010

I re-checked current master and confirmed that zOneOf is no longer present in src/utils/zod.ts (only zGetDefault is exported), and there are no call sites for zOneOf in the codebase.

So this report is outdated on current master and not actionable as a behavior fix now. I will close/withdraw this as not applicable to the current code.

Jaswanth-arjun avatar Mar 21 '26 14:03 Jaswanth-arjun