-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix(fromOpenApi): remove extra whitespace from content type #62
Conversation
src/open-api/utils/open-api-utils.ts
Outdated
@@ -263,6 +257,14 @@ export function toBody( | |||
return null | |||
} | |||
|
|||
function getAcceptedContentTypes(request: Request): string[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for jumping on this so fast, @Kiskae! The changes look great. The only thing that's missing is an automated test for this.
Feel free to explore and add one, otherwise I will try to add it later next week. Thank you!
@Kiskae Thanks for taking care of this. Never thought of the whitespaces 🤗 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Added some tests. After looking at the RFC I realized that there are more complex accept headers that aren't being handled, but solving that probably involves adding dependencies. So I've just added some skipped tests as a reminder that they exist. Also made it so the automated tests in src actually get executed :P
Lets just say the reason I found this involves legacy applications and auto-generated openapi specs |
This looks fantastic! Thank you for adding the tests, @Kiskae! I've polished the things a bit, mostly around test names and changing the |
Released: v0.3.1 🎉This has been released in v0.3.1! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
Fixes #61