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

gRPC: Support JSONPath filter for response body #5996

Merged
merged 1 commit into from Jul 14, 2023

Conversation

sebastianjonasson
Copy link
Contributor

@sebastianjonasson sebastianjonasson commented May 26, 2023

changelog(Improvements): Added support for JSONPath queries for gRPC responses.

Description

Add support for JSONPath queries for gRPC responses bodies.

Currently the JSONPath filter input is rendered in the gRPC response tab, but does not apply the entered filter. This PR adds support for JSONPath filter by copying the current behavior of the response pane for http requests.

Type of change

Trivial change. Everything was already in place, just needed to copy the handler for applying the query.

How Has This Been Tested?

Manually tested using Insomnia UI on Ubuntu 22.04:

  1. Make gRPC request (that returns a json payload)
  2. Insert filter in the JSONData input field

Using develop branch:

  • Filter is not applied

Checking out this PR:

  • Filter is applied on response data

@sebastianjonasson sebastianjonasson changed the title gRPC: Support JSONPath in response gRPC: Support JSONPath filter for response body May 26, 2023
@bbbco
Copy link
Contributor

bbbco commented May 26, 2023

Really wish Insomnia would eventually move away from JSONPath towards something more functional and backwards compatible like JSONata

@sebastianjonasson
Copy link
Contributor Author

@jackkav - Could I also get you to take a look at PR?

@sebastianjonasson
Copy link
Contributor Author

@jackkav @filfreire @gatzjames @pavkout - Would appreciate some feedback on this PR as well. Thanks!

@jackkav jackkav added this pull request to the merge queue Jul 14, 2023
@jackkav
Copy link
Contributor

jackkav commented Jul 14, 2023

Thanks for the contribution, would be great to support something besides JSONPath too. jq has also been suggested but would require another native module which we aren't open to right now, but JSONata seems easier to adopt. It's not on our list right now but would be happy to help push forward a community contribution!

Merged via the queue into Kong:develop with commit 97138fc Jul 14, 2023
9 checks passed
@filfreire
Copy link
Member

@sebastianjonasson you can claim a free tshirt for this PR contribution - find more at https://konghq.com/community/open-source-contribution

jackkav pushed a commit to jackkav/insomnia that referenced this pull request Nov 24, 2023
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

4 participants