8000 StackOverflowError on swagger generation · Issue #1603 · springfox/springfox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
StackOverflowError on swagger generation #1603
Closed
@jmattheis

Description

@jmattheis

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();
	}
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0