Closed mschout closed 4 years ago
I don't want this code in mojolicious-plugin-openapi, since it involves looping through the body twice, making validation twice as slow. Please help fixing jhthorsen/json-validator#155 instead.
To make failing cases, try loading the plugin like this:
$app->plugin(OpenAPI => {..., coerce => 'booleans,numbers,strings,defaults'});
Sure, I'll look there. thanks!
In
requestBody
, it is possible to specify adefault
for each property per OpenAPI 3.0 like this:See https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v3.0/schema.yaml#L311 for where this is in the spec.
Currently this is not handled by the plugin, fix coming in PR shortly.