@@ -182,7 +182,8 @@ private Status validatePathParameters(final RequestEntity requestEntity, final N
182182 return result .getStatus ();
183183 }
184184 if (result .skippedParameters !=null && !result .skippedParameters .isEmpty ()) {
185- return new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , openApiOperation .getMethod (), openApiOperation .getPathString ().original ());
185+ return result .skippedParameters .stream ().map (p -> new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , p .getName (), openApiOperation .getPathString ().original ()))
186+ .filter (s ->s != null ).findFirst ().get ();
186187 }
187188 return null ;
188189 }
@@ -231,7 +232,8 @@ private Status validateQueryParameters(final RequestEntity requestEntity, final
231232 return result .getStatus ();
232233 }
233234 if (result .skippedParameters !=null && !result .skippedParameters .isEmpty ()) {
234- return new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , openApiOperation .getMethod (), openApiOperation .getPathString ().original ());
235+ return result .skippedParameters .stream ().map (p -> new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , p .getName (), openApiOperation .getPathString ().original ()))
236+ .filter (s ->s != null ).findFirst ().get ();
235237 }
236238 return null ;
237239 }
@@ -260,7 +262,8 @@ private Optional<Status> validatePathLevelHeaders(final RequestEntity requestEnt
260262 return Optional .ofNullable (result .getStatus ());
261263 }
262264 if (result .skippedParameters !=null && !result .skippedParameters .isEmpty ()) {
263- return Optional .ofNullable (new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , openApiOperation .getMethod (), openApiOperation .getPathString ().original ()));
265+ return result .skippedParameters .stream ().map (p -> new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , p .getName (), openApiOperation .getPathString ().original ()))
266+ .filter (s ->s != null ).findFirst ();
264267 }
265268 return Optional .ofNullable (null );
266269 }
@@ -274,7 +277,8 @@ private Optional<Status> validateOperationLevelHeaders(final RequestEntity reque
274277 return Optional .ofNullable (result .getStatus ());
275278 }
276279 if (result .skippedParameters !=null && !result .skippedParameters .isEmpty ()) {
277- return Optional .ofNullable (new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , openApiOperation .getMethod (), openApiOperation .getPathString ().original ()));
280+ return result .skippedParameters .stream ().map (p -> new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , p .getName (), openApiOperation .getPathString ().original ()))
281+ .filter (s ->s != null ).findFirst ();
278282 }
279283 return Optional .ofNullable (null );
280284 }
@@ -300,7 +304,8 @@ private Optional<Status> validatePathLevelCookies(final RequestEntity requestEnt
300304 return Optional .ofNullable (result .getStatus ());
301305 }
302306 if (result .skippedParameters !=null && !result .skippedParameters .isEmpty ()) {
303- return Optional .ofNullable (new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , openApiOperation .getMethod (), openApiOperation .getPathString ().original ()));
307+ return result .skippedParameters .stream ().map (p -> new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , p .getName (), openApiOperation .getPathString ().original ()))
308+ .filter (s ->s != null ).findFirst ();
304309 }
305310 return Optional .ofNullable (null );
306311 }
@@ -314,7 +319,8 @@ private Optional<Status> validateOperationLevelCookies(final RequestEntity reque
314319 return Optional .ofNullable (result .getStatus ());
315320 }
316321 if (result .skippedParameters !=null && !result .skippedParameters .isEmpty ()) {
317- return Optional .ofNullable (new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , openApiOperation .getMethod (), openApiOperation .getPathString ().original ()));
322+ return result .skippedParameters .stream ().map (p -> new Status (VALIDATOR_REQUEST_PARAMETER_MISSING , p .getName (), openApiOperation .getPathString ().original ()))
323+ .filter (s ->s != null ).findFirst ();
318324 }
319325 return Optional .ofNullable (null );
320326 }
@@ -367,7 +373,7 @@ public Status getStatus() {
367373 return statuses .isEmpty ()?null :statuses .get (0 );
368374 }
369375
370- public List <Status > getAllStatueses (){
376+ public List <Status > getAllStatues (){
371377 return Collections .unmodifiableList (statuses );
372378 }
373379 }
0 commit comments