Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Provide a Response Form to view Response just like Request form showing all field names and path underneath #308

Open
alapativ2 opened this issue Mar 22, 2024 · 1 comment

Comments

@alapativ2
Copy link

alapativ2 commented Mar 22, 2024

Request Form is super helpful when creating requests as they sow he field names and path below using . notation. Likewise the response is just printed as text and can we also have it formatted as a response form and it helps to expand or collapse super large or long nested entities. The readme does show the response as a form but i cannot see the form but simple response section with plain text. I'm using latest version not via reflection but using protos . Any hidden flag or option to enable response form is much appreciated. Quote from Read me " And, of course, it shows a human-comprehensible response body, in the form of an HTML table."

@jhump
Copy link
Contributor

jhump commented Apr 10, 2024

@alapativ2, FYI, versions prior to 1.2.0 actually used an HTML layout to display the response instead of the text area with the JSON contents. But it turns out that RPC schemas often have asymmetric message complexity: the request messages are often simple/small, but response message are often large/complex. So while it is usually reasonable to render a form with the request, rendering responses into HTML is often not reasonable (like for RPCs with large responses) and led to non-trivial performance issues.

There is actually a TODO in the code to provide an HTML layout for the response (in a way, restoring the old functionality), but it would likely be based on user-selection vs. being the default, so as to only be a possible performance issue when the user explicitly requests it to be rendered that way. BTW, things that were missing from the HTML response in those old pre-v1.2.0 versions (things which weren't added to the request HTML until v1.3.0) are extra response schema information. Ideally, if/when the HTML response feature is added, the structure would show not just the field names and values but also provide info about the field types and even have tool-tips/hover information to show fields' comments and options -- just like is available in the request form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants