Hi All,
we are using SpringFox to generate our Spring Rest API documentation, but having an issue while creating the swagger.json,Swagger version is 2.0("swagger":"2.0").
One of the spring controller we have a set of end points like shown below(marked as bold).
public @responsebody ResponseEntity bulkUpdateEmployee(RequestBody List contactIdList,RequestHeader(Constants.TOKEN_KEY) String authToken) {}
public @responsebody ResponseEntity bulkUpdateCategory(RequestBody List contactIdList,@RequestHeader(Constants.TOKEN_KEY) String authToken) {} etc.
So the Json Created is also having the same
[{"in":"body","name":"contactIdList","description":"contactIdList","required":true,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}},{"name":"categoryId","in":"path","description":"categoryId","required":true,"type":"integer","format":"int64"},{"name":"token","in":"header","description":"authToken","required":true,"type":"string"}],"responses":controller"],"summary":"bulkUpdateEmployee","operationId":"bulkUpdateEmployeeUsingPOST","consumes":["application/json"],"produces":["/"],"parameters":[{"in":"body","name":"contactIdList","description":"contactIdList","required":true,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}},{"name":"employeeId","in":"path","description":"employeeId","required":true,"type":"integer","format":"int64"}
While importing the tool is giving error like " contactIdList is duplicate and the same model name already exist" because of the same name and parameters.
Is there a way to overcome this ?
Thanks in advance.
Vivek