Closed
Description
Version 2.6.1
Example at https://github.com/jmattheis/springfox-demos/tree/stackoverfloeexception/spring-java-swagger
When having class A which has as attribute class B. And class B has as attribute class A, a StackOverflowError
is thrown
public class CustomType {
private OtherCustomType otherCustomType;
public OtherCustomType getOtherCustomType() {
return otherCustomType;
}
public void setOtherCustomType(final OtherCustomType otherCustomType) {
this.otherCustomType = otherCustomType;
}
}
public class OtherCustomType {
private CustomType parent;
public CustomType getParent() {
return parent;
}
public void setParent(final CustomType parent) {
this.parent = parent;
}
}
@RestController
public class Controller {
@RequestMapping(value = "get", method = RequestMethod.GET)
public ResponseEntity<Void> get(final CustomType test) {
return ResponseEntity.ok().build();
}
}