You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting a parameter type as boolean with v3, I discovered that the value returned by validation->output() is not a JSON::PP::Boolean but a scalar. While debugging, I found out that the value was not going through the coerse function, and this was coming from the field type not being taken into account.
The type seems not to be retrieved correctly in lib/JSON/Validator/OpenAPI/Mojolicious.pm, line 69 : my ($in, $name, $type) = @$p{qw(in name type)};
This works with v2, but with v3 the type should be within the schema property ($p->{schema}{type}) or even within the content property (according to the specs).
This is the YAML I used for my tests
paths:
/context/db_default_dsn:
get:
operationId: getContextDbDefaultDsn
x-mojo-name: get_context_db_default_dsn
x-mojo-to: 'context#get_db_default_dsn'
summary: "Retourne la base de donnée par défaut pour l'environnement"
parameters:
- name: ano
in: query
description: Indique si l'on veut la base anonyme
schema:
type: boolean
The text was updated successfully, but these errors were encountered:
When setting a parameter type as boolean with v3, I discovered that the value returned by
validation->output()
is not a JSON::PP::Boolean but a scalar. While debugging, I found out that the value was not going through the coerse function, and this was coming from the field type not being taken into account.The type seems not to be retrieved correctly in lib/JSON/Validator/OpenAPI/Mojolicious.pm, line 69 :
my ($in, $name, $type) = @$p{qw(in name type)};
This works with v2, but with v3 the type should be within the schema property (
$p->{schema}{type}
) or even within the content property (according to the specs).This is the YAML I used for my tests
The text was updated successfully, but these errors were encountered: