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.
zodios
looks like a potentially interesting replacement for Orval, because it can generate Zod schemas for your API's types [*], and because it appears to have excellent TypeScript type inference support. While developing this PR, I got really nice help in my editor when using its API hooks.Unfortunately, as far as I can tell, it's also completely unusable for us in its current state, because it doesn't seem to support late binding of parameters to its React Query hooks. It sounds like this will be addressed in v11:
I've pushed this WIP branch to keep track of the work I've done thus far, in the hopes we can revisit
zodios
once the new version is released.[*] I think that Orval can generate Zod schemas for your API, as well, but you wouldn't know it, because it's not covered anywhere in its documentation, which is my primary complaint about Orval and one of the reasons I'm looking for alternatives.