devtools icon indicating copy to clipboard operation
devtools copied to clipboard

feat: Pre-created query and body fields

Open isakgustavsen opened this issue 5 months ago â€ĸ 3 comments

🆒 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

isakgustavsen avatar Jul 15 '25 15:07 isakgustavsen

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 avatar Aug 06 '25 05:08 antfu

@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.

NyllRE avatar Aug 27 '25 15:08 NyllRE

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

isakgustavsen avatar Aug 27 '25 19:08 isakgustavsen