java - Springfox JSON PUT request with String Request Body not formatting correctly -
i'm using springfox 2.7.0 generate swagger ui docs spring rest api. operations (get, put, delete) testing fine on of endpoints via integration test cases. requests returning data fine via swagger ui put operations via "try out!" part failing due how request body sent. have following signature in 1 of rest api endpoints (which typical of how put endpoints are):
@requestmapping(value = "/runsql", method = requestmethod.put) public responseentity<string> runsql(@requestbody string json, httpservletrequest request)
when use "try out!" via swagger ui produced springfox, json request body comes in looking this:
"{ \"id\" : \"1234\", \"sql\" : \"select * users\" }"
jackson doesn't json string.
how can configure springfox and/or spring process json string correctly via "try out!" section on swagger ui?
Comments
Post a Comment