swagger-api / swagger-play

Apache License 2.0
330 stars 181 forks source link

jackson InvalidDefinitionException #226

Open nursace opened 3 years ago

nursace commented 3 years ago

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.

dwickern commented 3 years ago

See the discussion in #220