Skip to content

Fix parsing of the comma-separated membershipIds query param#131

Open
lildeadprince wants to merge 2 commits into
Raid-Hub:mainfrom
lildeadprince:fix/instance-finder-membership-ids
Open

Fix parsing of the comma-separated membershipIds query param#131
lildeadprince wants to merge 2 commits into
Raid-Hub:mainfrom
lildeadprince:fix/instance-finder-membership-ids

Conversation

@lildeadprince

@lildeadprince lildeadprince commented May 22, 2026

Copy link
Copy Markdown

Instance Finder API does not correctly preprocess membershipIds comma-separated string due to wrong Zod schema implementation.

  1. Fixed the schema and changed the way of extending the target schema of the z.preprocess (since it returns ZodEffect instead of a type)
  2. Added white-space trimming of comma-separated values
  3. Covered with a few tests (5 are failing without the fix)
image
`z.array(z.preprocess(...))` expects an array an fails on string input image
"Profile/Instance Finder" fails on any query containing another IDs `https://api.raidhub.io/player//instances?membershipIds=` image
@lildeadprince lildeadprince force-pushed the fix/instance-finder-membership-ids branch from 16b9f7b to ddddc86 Compare May 22, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant