feat: Pre-created query and body fields
đ Your use case
When testing an api it would be nice to have the info it takes ready, and possibly prefilled for testing
đ The solution you'd like
Would be nice if this could be integrated with validation solutions like Zod. That would also solve the issue of work having to be done twice and avoid out of date information
đ Alternatives you've considered
No response
âšī¸ Additional info
No response
Can you elaborate? Ideally we don't want to be coupled with certain solution like Zod or so, otherwise it should be provided by integration modules
@antfu validation solutions might be a reach but the idea of prefilling the info each api route takes is worth exploring. currently Server Routes has the potential to be fully equipped and compete with similar tools but it's so rigid and unmodifiable. I even suggested a further improvement in another issue #885.
Would love the Server routes tab to get the treatment to be fully sufficient for teams to understand the api's correctly.
Honestly if the tab could show the body it takes it would be amazing and more than enough. Currently if you are testing an api through it the body field clears every single time the dev server updates after save. Zod was just an idea for how to provide a format but I'm sure there are other and better solutions.
Even better if it could parse and create a form, but that might be excessive