Springfox: Response content type "*/*" is not overridden

Created on 2 Apr 2015  路  1Comment  路  Source: springfox/springfox

Hi,

I cannot get rid of this default content type : I have added produces="application/json" in @ApiOperation. It is correctly interpreted, as I can see it in swagger ui. However, it doesn't remove the "_/_" that is present by default.
I have checked the generated json, it includes both, so it is not an issue for swagger ui.

produces: [2]
0:  "*/*"
1:  "application/json"

Any idea on how to remove this default type ?
Or better, is there a way to define globally a response content type ? Can swagger springfox automatically detect that responses are json ?

Thanks

Most helpful comment

Ok, I just found that it was because I haven't set the response type in @RequestMapping.

>All comments

Ok, I just found that it was because I haven't set the response type in @RequestMapping.

Was this page helpful?
0 / 5 - 0 ratings