For questions related to springfox, please file a ticket on the project - 
https://github.com/springfox/springfox/.

 

 

 

From: <[email protected]> on behalf of 
"[email protected]" <[email protected]>
Reply-To: "[email protected]" 
<[email protected]>
Date: Friday, 7 April 2017 at 2:22
To: Swagger <[email protected]>
Subject: swagger spring mvc json array

 

i have a  spring mvc swagger UI  project ,now i need to use HTTP POST send JSON 
array,but there has some exception: 

2017-04-07 17:20:03.011 [http-bio-8080-exec-2] DEBUG 
org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 
'swaggerapi' processing POST request for [/swagger-api/register/demo]

2017-04-07 17:20:03.021 [http-bio-8080-exec-2] DEBUG 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
 - Looking up handler method for path /register/demo

2017-04-07 17:20:03.021 [http-bio-8080-exec-2] DEBUG 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
 - Returning handler method [public 
com.cummins.cdp.cd.api.model.response.Result 
com.cummins.cdp.cd.api.controller.CustomerRegisterApi.registrationPost1(com.cummins.cdp.cd.api.model.request.registertion.RegistertionLists,java.lang.String,java.lang.Integer)]

2017-04-07 17:20:03.021 [http-bio-8080-exec-2] DEBUG 
org.springframework.beans.factory.support.DefaultListableBeanFactory - 
Returning cached instance of singleton bean 'customerRegisterApi'

------------------------------------------>>>>

2017-04-07 17:20:03.022 [http-bio-8080-exec-2] DEBUG 
org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver
 - Resolving exception from handler [public 
com.cummins.cdp.cd.api.model.response.Result 
com.cummins.cdp.cd.api.controller.CustomerRegisterApi.registrationPost1(com.cummins.cdp.cd.api.model.request.registertion.RegistertionLists,java.lang.String,java.lang.Integer)]:
 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

2017-04-07 17:20:03.022 [http-bio-8080-exec-2] DEBUG 
org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver 
- Resolving exception from handler [public 
com.cummins.cdp.cd.api.model.response.Result 
com.cummins.cdp.cd.api.controller.CustomerRegisterApi.registrationPost1(com.cummins.cdp.cd.api.model.request.registertion.RegistertionLists,java.lang.String,java.lang.Integer)]:
 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

2017-04-07 17:20:03.022 [http-bio-8080-exec-2] DEBUG 
org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver - 
Resolving exception from handler [public 
com.cummins.cdp.cd.api.model.response.Result 
com.cummins.cdp.cd.api.controller.CustomerRegisterApi.registrationPost1(com.cummins.cdp.cd.api.model.request.registertion.RegistertionLists,java.lang.String,java.lang.Integer)]:
 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

 

 

and this my java code:

public Result registerPost(@ApiParam(value = "Registertion Json", required = 
true) RegistertionLists model,

@ApiParam(value = "parameter1") @RequestParam(required = true) String username,

@ApiParam(value = "parameter2") @RequestParam(required = false) Integer 
password) {

return customerReceive.getReceiveBeanDemo(model);

}

Thanks a lot!

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to