0

I am using atlassian swagger request validator in my springboot application. I tried to configure all the beans as explained in the [official documentation][1] [1]: https://bitbucket.org/atlassian/swagger-request-validator/src/master/swagger-request-validator-springmvc/. But I am getting the below error

{

"status": 400,
"error": "Bad Request",
"message": "{\r\n  \"messages\" : [ {\r\n    \"key\" : \"validation.request.body.schema.unknownError\",\r\n    \"level\" : \"ERROR\",\r\n    \"message\" : \"An error occurred during schema validation - null.\",\r\n    \"context\" : {\r\n      \"requestPath\" : \"/mybook/mypage/12345/rules/\",\r\n      \"apiRequestContentType\" : \"application/json\",\r\n      \"location\" : \"REQUEST\",\r\n      \"requestMethod\" : \"POST\"\r\n    }\r\n  } ]\r\n}",
"trace": "com.atlassian.oai.validator.springmvc.InvalidRequestException: {\r\n  \"messages\" : [ {\r\n    \"key\" : \"validation.request.body.schema.unknownError\",\r\n    \"level\" : \"ERROR\",\r\n    \"message\" : \"An error occurred during schema validation - null.\",\r\n    \"context\" : {\r\n      \"requestPath\" : \"/mybook/mypage/12345/rules/\",\r\n      \"apiRequestContentType\" : \"application/json\",\r\n      \"location\" : \"REQUEST\",\r\n      \"requestMethod\" : \"POST\"\r\n    }\r\n  } ]\r\n}\r\n\tat com.atlassian.oai.validator.springmvc.DefaultValidationReportHandler.createValidationException(DefaultValidationReportHandler.java:96)\r\n\tat com.atlassian.oai.validator.springmvc.DefaultValidationReportHandler.processApiValidationReport(DefaultValidationReportHandler.java:63)\r\n\tat com.atlassian.oai.validator.springmvc.DefaultValidationReportHandler.handleRequestReport(DefaultValidationReportHandler.java:49)\r\n\tat com.atlassian.oai.validator.springmvc.OpenApiValidationInterceptor.preHandle(OpenApiValidationInterceptor.java:96)\r\n\tat org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:136)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1033)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)\r\n\tat org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)\r\n\tat 

Any pointers to resolve this issue will be helpful

Anil Bhaskaran
  • 495
  • 1
  • 8
  • 23

1 Answers1

0

I believe the issue is with the latest version. I used 2.7x and is working fine

Anil Bhaskaran
  • 495
  • 1
  • 8
  • 23