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

Body Transform Plugin doesn't work when Validate JSON plugin is enabled when tested inside API DEBUGGER #2425

Closed
victordas opened this issue Jul 24, 2019 · 6 comments

Comments

@victordas
Copy link

commented Jul 24, 2019

Bug in API DEBUGGER

Tyk 1.8.2, Tyk Cloud
I’m using the following plugins for an endpoint.
Body Transform
Track Endpoint
URL Rewrite
Validate JSON.

Current Behavior:
I am able to get correct response from Postman.
But Bad Request received by the Server in API DEBUGGER.
It works on both Postman and Debugger if I remove Validate JSON.

Expected Behavior:
I should be able to get correct response from Postman.
I should be able to get correct response from API DEBUGGER.

Schema Definition File Download

@ilijabojanovic

This comment has been minimized.

Copy link
Member

commented Jul 24, 2019

Hi @victordas thank for reporting this issue, could you please attach api definition here in ticket

@victordas

This comment has been minimized.

Copy link
Author

commented Jul 24, 2019

@ilijabojanovic Do you definition including authorization info. In that case it won't be possible.

@letzya

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

No it doesn't include authorization info. You can go export it from the UI when you are on the API screen(or copy from the raw api definition or use the rest endpoint and call /api/apis/{api-id} )

image

@victordas

This comment has been minimized.

Copy link
Author

commented Jul 25, 2019

@buger buger added the bug label Aug 6, 2019

buger added a commit that referenced this issue Aug 6, 2019

Fix Body Transform with Validate JSON plugin
We use special `nopCloser` wrapper for body, which is smart enough
to automatically rewind the body when it fully read.

When we set new body, we need wrap it to noCloser again.

Fix #2425

@buger buger closed this in #2446 Aug 6, 2019

buger added a commit that referenced this issue Aug 6, 2019

Fix Body Transform with Validate JSON plugin (#2446)
We use special `nopCloser` wrapper for body, which is smart enough
to automatically rewind the body when it fully read.

When we set new body, we need wrap it to noCloser again.

Fix #2425

@ilijabojanovic ilijabojanovic added this to the Release 2.8.4 milestone Aug 6, 2019

tykbot bot pushed a commit that referenced this issue Aug 7, 2019

Fix Body Transform with Validate JSON plugin (#2446)
We use special `nopCloser` wrapper for body, which is smart enough
to automatically rewind the body when it fully read.

When we set new body, we need wrap it to noCloser again.

Fix #2425

(cherry picked from commit bced1b9)
@victordas

This comment has been minimized.

Copy link
Author

commented Aug 7, 2019

Thanks for resolving, Is it possible to get installation patch ?

@buger

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

Should be released as patch in next 2 weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.