swagger-play icon indicating copy to clipboard operation
swagger-play copied to clipboard

jackson InvalidDefinitionException

Open nursace opened this issue 3 years ago • 1 comments

Hi there, does swagger-play support play 2.8.2 ? I'm struggling with this error:

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: io.swagger.models.Swagger["definitions"]->java.util.LinkedHashMap["HttpEntity"] o.swagger.models.ModelImpl["properties"]->java.util.LinkedHashMap["knownEmpty"] o.swagger.models.properties.BooleanProperty["readOnly"]) Here are my dependencies in build.sbt:

  "com.iterable" %% "swagger-play" % "2.0.1",
    "org.webjars" % "swagger-ui" % "3.13.0",
    "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.10.4"

it builds fine, but when I trying to make GET request to localhost:9000/docs/swagger.json it crushes with error above. And also, I can see, that swagger was able to find my controllers with API annotation and then instantly I got that error.

nursace avatar Jan 19 '21 10:01 nursace

See the discussion in #220

dwickern avatar Feb 07 '21 16:02 dwickern