-
-
Notifications
You must be signed in to change notification settings - Fork 494
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
Allow to select the response content type #1597
Allow to select the response content type #1597
Conversation
🦋 Changeset detectedLatest commit: c4bd0bd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This is an elegant solution to allow a workaround while we come up with a better fix, thank you! While it is a core goal of this library to not have to use generics for anything, this does need a temporary workaround. Agree on not documenting it while a more automatic solution is explored. |
This looks great! If you could just add a |
3113748
to
c4bd0bd
Compare
@drwpow I add the changeset as requested |
@drwpow Thanks for the merge. Can you publish a new version or just update the |
Just published a new |
Er, sorry; got my PRs mixed up. Meant to say this is published at |
Changes
This is a simple change that for now only allow to select the content type of the response. Inspired by the @NikolaStojicic patch.
Fix #1291
This solution is not perfect but allow to fix the issue. Clearly a more robust solution could be to infer the
MediaType
by reading theAccept
header. If multiple content and theAccept
header not set, the lib could fallback to anunknown
data.Checklist
docs/
updated (if necessary)pnpm run update:examples
run (only applicable for openapi-typescript)