When a request is sent to an endpoint where the requestBody is defined without a required field, the following exception is thrown:
17:54:59.003 [XNIO-1 task-3] ERROR c.n.exception.ExceptionHandler handleRequest - Exception:
java.lang.NullPointerException: null
at com.networknt.openapi.RequestValidator.validateRequestBody(RequestValidator.java:96)
at com.networknt.openapi.RequestValidator.validateRequest(RequestValidator.java:79)
at com.networknt.openapi.ValidatorHandler.handleRequest(ValidatorHandler.java:73)
When a request is sent to an endpoint where the
requestBodyis defined without arequiredfield, the following exception is thrown: