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

Change API Explorer to use JSON field names and JSON output #577

Merged
merged 13 commits into from
Jan 20, 2023

Conversation

simon-johansson
Copy link
Contributor

Main change:

  • Request input (headers, query string and body) are now in the format in which the user would interact with the endpoint and not the GO request struct.

Before
Screenshot 2023-01-12 at 16 49 47

New
Notice also that we are now showing the URL even when it does not have dynamic path params

Screenshot 2023-01-12 at 16 49 21

Other changes:

  • Always show the request path even when the path does not have dynamic parts (see screenshot above)
  • Show the request url in the tracing view
  • Replace the JSON viewer to the same lib that we use on app.encore.dev

Old JSON viewer
Screenshot 2023-01-12 at 16 50 10

New JSON viewer
Screenshot 2023-01-12 at 16 50 04

@encore-cla
Copy link

encore-cla bot commented Jan 12, 2023

All committers have signed the CLA.

@eandre eandre self-requested a review January 13, 2023 10:39
We had an issue where we computed the
RPC encoding name differently from what
the developer dashboard was expecting,
due to using `strings.ToLower` to canonicalize
HTTP header names.

Fix this by separating the name from the wire
format.

reqBody = JSON.stringify(newBody);

const defaultMethod = hasBody ? "POST" : "GET";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use reqEncoding.http_methods[0] instead

@eandre eandre merged commit ffe561a into main Jan 20, 2023
@eandre eandre deleted the api_explorer_json_fields branch January 20, 2023 10:11
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

Successfully merging this pull request may close these issues.

None yet

2 participants