- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Documentation generation for class with name File is invalid. I've created a sample project https://github.com/dreambrother/springfox-bug-example with two identical classes File and File1, and used them in a controller:
@RequestMapping(path = "/files/{fileId}", method = RequestMethod.GET) public File file(@PathVariable String fileId) { return new File().id(fileId); } @RequestMapping(path = "/files1/{fileId}", method = RequestMethod.GET) public File1 file1(@PathVariable String fileId) { return new File1().id(fileId); }File and File1 exist in definition section of generated JSON doc. Documentation for the response with File1 model is valid:
{"description":"OK","schema":{"$ref":"#/definitions/File1"}}But for the File is not:
{"description":"OK","schema":{"type":"file"}}Version: 2.6.1
alexey-atiskov