Skip to content

Fix Client.request returning raw strings instead of dicts - #12

Merged
francescobianco merged 1 commit into
openapi:mainfrom
Deadpool2000:fix-issue-6
Mar 24, 2026
Merged

francescobianco merged 1 commit into
openapi:mainfrom
Deadpool2000:fix-issue-6

Conversation

@Deadpool2000

@Deadpool2000 Deadpool2000 commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

#6 I noticed that Client.request() sometimes returns double-encoded JSON as a raw string instead of a parsed dictionary. This forces users (especially in Flask apps) to manually write json.loads(resp) repeatedly, which is a bit of a hassle.

This PR fixes that by ensuring we automatically decode the string into a dict under the hood, saving everyone from writing extra boilerplate.

Let me know if you need any changes!

…n Client.request

fix: decode raw JSON strings to dictionaries in client.request() to remove Flask boilerplate

fix: natively decode stringified API responses into JSON dicts within the SDK~
@francescobianco

Copy link
Copy Markdown
Member

Thanks @Deadpool2000 for the contribution here — we’re about to approve and merge this PR 👍

Also, we’ve just launched a small initiative to recognize people contributing to the Openapi ecosystem.

If you’d like, you can add yourself as a contributor (you’d be among the first):
👉 https://github.com/openapi/contributors

We’re also getting things ready for Hacktoberfest, so more updates coming soon.

Feel free to follow the instructions in the repo and add yourself to the list.

@francescobianco
francescobianco merged commit 7cef3e1 into openapi:main Mar 24, 2026
@Deadpool2000

Deadpool2000 commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks @francescobianco :)

Also I am interested in Hacktoberfest. Share me details if any.

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.

2 participants