@@ -182,7 +182,8 @@ private Status validatePathParameters(final RequestEntity requestEntity, final N
182
182
return result .getStatus ();
183
183
}
184
184
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 ();
186
187
}
187
188
return null ;
188
189
}
@@ -231,7 +232,8 @@ private Status validateQueryParameters(final RequestEntity requestEntity, final
231
232
return result .getStatus ();
232
233
}
233
234
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 ();
235
237
}
236
238
return null ;
237
239
}
@@ -260,7 +262,8 @@ private Optional<Status> validatePathLevelHeaders(final RequestEntity requestEnt
260
262
return Optional .ofNullable (result .getStatus ());
261
263
}
262
264
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 ();
264
267
}
265
268
return Optional .ofNullable (null );
266
269
}
@@ -274,7 +277,8 @@ private Optional<Status> validateOperationLevelHeaders(final RequestEntity reque
274
277
return Optional .ofNullable (result .getStatus ());
275
278
}
276
279
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 ();
278
282
}
279
283
return Optional .ofNullable (null );
280
284
}
@@ -300,7 +304,8 @@ private Optional<Status> validatePathLevelCookies(final RequestEntity requestEnt
300
304
return Optional .ofNullable (result .getStatus ());
301
305
}
302
306
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 ();
304
309
}
305
310
return Optional .ofNullable (null );
306
311
}
@@ -314,7 +319,8 @@ private Optional<Status> validateOperationLevelCookies(final RequestEntity reque
314
319
return Optional .ofNullable (result .getStatus ());
315
320
}
316
321
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 ();
318
324
}
319
325
return Optional .ofNullable (null );
320
326
}
@@ -367,7 +373,7 @@ public Status getStatus() {
367
373
return statuses .isEmpty ()?null :statuses .get (0 );
368
374
}
369
375
370
- public List <Status > getAllStatueses (){
376
+ public List <Status > getAllStatues (){
371
377
return Collections .unmodifiableList (statuses );
372
378
}
373
379
}
0 commit comments