play-swagger
play-swagger copied to clipboard
Package objects break property references
I have a case class in my Play app called Movies
. Movies
has an item editions
which is of type Seq[MovieEdition]
. With the classes in the file models/Output.scala
with the package models.output
, the swagger JSON is generated properly including all types (/definitions/models.output.MovieEdition
as expected) and property type references resolve as expected. Since moving the case classes to a package object, I get the following error when opening my swagger.json file:
Resolver error at paths./movies.get.responses.200.schema.properties.editions.items.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/models.output.package.MovieEdition does not exist in document
The case classes are located in a file models/output/package.scala
with the package models.output
. The model types are generated just fine in the swagger.json file, but the references mistakenly assume that the name includes .package
as part of the package name.
Same exact issue for me as well !
same here
@sloshy @senegalo @alexmnyc We are currently reviewing it. It may take some time, but we plan to address it.