Hi! I am fairly new to swagger UI and having a problem using it.
Everything works find except when I try to do this. <https://lh3.googleusercontent.com/-WutbbNJXex4/V96awSpWssI/AAAAAAAAABw/O_e0RXhtPgQPeorvE9P61K0sKrBSdKpLQCLcB/s1600/swagger_ui.png> I tried every possible input for the hashtags list but nothing works with the following error. { "timestamp": 1474206473958, "status": 400, "error": "Bad Request", " exception": "org.springframework.validation.BindException", "errors": [ { " codes": [ "typeMismatch.postCreationRequest.hashtags", "typeMismatch.hashtags", "typeMismatch.java.util.List", "typeMismatch" ], " arguments": [ { "codes": [ "postCreationRequest.hashtags", "hashtags" ], " arguments": null, "defaultMessage": "hashtags", "code": "hashtags" } ], " defaultMessage": "Failed to convert property value of type [java.lang.String[]] to required type [java.util.List] for property 'hashtags'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [java.util.Map] for property 'hashtags[0]': no matching editors or conversion strategy found", "objectName": "postCreationRequest", "field": "hashtags", " rejectedValue": "tag,tag,tag", "bindingFailure": true, "code": "typeMismatch" } ], "message": "Validation failed for object='postCreationRequest'. Error count: 1", "path": "/createOfficialPost" } If I do not provide anything is the hashtags field, everything works fine. the model schema looks like this { "date": "string", "hashtags": [ {} ], "id": 0, "image": { "id": 0, "s3_key": "string", "url": "string" }, "landmark": "string", "lat": 0, "likes": 0, " lng": 0, "message": "string", "official": true, "privacy": true, " radius_in_km": 0, "username": "string" } In what way should I write there to make it work? This is my API endpoint: public Post submit(HttpServletRequest request, @ModelAttribute Post post, @RequestPart("image") MultipartFile image) { -- 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.
