Skip to content

Fix invalid JSON in /version endpoint response - #538

Merged
abecevello merged 2 commits into
Shopify:mainfrom
whatyouhide:fix-version-endpoint
Oct 25, 2023
Merged

abecevello merged 2 commits into
Shopify:mainfrom
whatyouhide:fix-version-endpoint

Conversation

@whatyouhide

Copy link
Copy Markdown
Contributor

The /version endpoint returns invalid JSON, because the \n character at the end of the response is escaped by the backticks. This PR should fix that. I’m no Go expert, so I’m just winging this 🙃

@whatyouhide

Copy link
Copy Markdown
Contributor Author

I have signed the CLA!

@whatyouhide

Copy link
Copy Markdown
Contributor Author

Hi @miry! 👋 This seems like a small but nice fix to have in here. Let me know if I can do anything to expedite this 😊

@miry

miry commented Oct 25, 2023

Copy link
Copy Markdown
Contributor

cc: @abecevello

@iyaz-shaikh

Copy link
Copy Markdown
Member

This should work, running this playground shows the difference between the two string structures. Once CI passes, I'll also throw an approval on this 👍

@abecevello

abecevello commented Oct 25, 2023 •

Copy link
Copy Markdown
Member

@whatyouhide I've run the tests and it looks like TestVersionEndpointReturnsVersion is failing on this branch. Would you be able to update that test so it reflects the change you made?

@whatyouhide

Copy link
Copy Markdown
Contributor Author

Ah, yes. Sorry, I didn't even run tests locally cause I don't work in Go and had nothing set up for it. I took the laziest approach 😅

Anyways, I pushed a commit that should fix the test 🤞

@iyaz-shaikh iyaz-shaikh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

@abecevello
abecevello merged commit c3d8bf6 into Shopify:main Oct 25, 2023
@abecevello

Copy link
Copy Markdown
Member

@whatyouhide thanks for the fix. I've merged it and I'll see about doing a release that includes this soon.

@whatyouhide
whatyouhide deleted the fix-version-endpoint branch October 25, 2023 14:25
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.

4 participants