[inversify-express-utils] JsonContent incorrectly serialised as string
Reposting issue from invserify-express-utils here.
https://github.com/inversify/inversify-express-utils/issues/378
Expected Behavior
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.
Current Behavior
Json content is sent as a string, which causes downstream middleware that expects Json content to fail.
Possible Solution
https://github.com/inversify/inversify-express-utils/pull/379
Context
Trying to use the openapi-validator-middleware library with the inversify express server and BaseHttpController.json().
The validator library expects content as JSON data, but the BaseHttpController.json function results in data being sent as a plain string. This causes the validator to skip checks on the result - rendering it useless.