-
Notifications
You must be signed in to change notification settings - Fork 100
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
JsonContent doesn't send correctly #378
Comments
@dcavanagh What's the release cycle for this repo? Just wondering when I'll be able to make use of this as part of a released version? |
Hello, are there any plans to release a new version including this fix @dcavanagh ? |
@egmacke @dweller23 sorry for the delay, I will publish this as |
Pleased to say this is now published on npm in version 6.4.4 @egmacke @dweller23 Apologies for the delay, I will be part of the regular project maintainers now to resolve any issues going forwards. Thank you for your patience cc @GrzegorzKozub @mcrg (you 👍'ed the comment) |
There was an issue with the publish process in |
There are some breaking changes in the TypeScript upgrade/modernisation which must be resolved/documented before releasing. Please track the progress here #396. This is my top priority ATM and I hope to have it resolved in the next few days |
@Jameskmonger #396 looks to be resolved, but there's not been a release since. Is there any update on this? |
When using the
BaseHttpController
helper methodBaseHttpController.json(...)
the resulting express call coerces the json object to a string.This causes problems when using express middleware that validates JSON responses (in this case using
openapi-validator-middleware
) as the data is no-longer a JSON object.The root cause of this appears to be that the use of
HttpContent
enforcing all data as a string inreadAsStringAsync()
.My understanding is that this is to avoid potential issues where numeric data is interpreted by express as a status code, but I believe that it would be safe to all
string | object
types to be sent.I will open a PR shortly with a proposed fix for this.
The text was updated successfully, but these errors were encountered: