JsonContent doesn't send correctly
When using the BaseHttpController helper method BaseHttpController.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 in readAsStringAsync().
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.
@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 6.4.4 when I finish work today (#390)
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 6.4.4, I have deprecated the release and am working to publish a new version now
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?