Bug 30194: (follow-up) Fix xt/api.t

The query object can have an arbitrary structure, and thus it doesn't
make sense to check for the additionalProperties presence. also, it is
not allowed by OpenAPIv2 :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Tomas Cohen Arazi 2022-03-29 17:12:39 +02:00 committed by Fridolin Somers
parent 7b2460db29
commit 8e9fab60ca
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ foreach my $route ( keys %{$paths} ) {
&& $parameter->{schema}->{type} eq 'object' ) {
# it is an object type definition
if ( not exists $parameter->{schema}->{additionalProperties} ) {
if ( $parameter->{name} ne 'query' # our query parameter is under-specified
and not exists $parameter->{schema}->{additionalProperties} ) {
push @missing_additionalProperties,
{ type => 'parameter',
route => $route,