-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassNotFoundException from ApiModelProperty and dataType #12
Comments
You shouldn't need to use Maybe there's a problem building the classpath in your use-case. Are you using this project directly or via sbt-swagger-play? |
Thanks for the reply @dwickern. So, I'll say that I'm new to this project and tasked with this upgrade, so I don't have a lot of historical knowledge as to why things were done. I'm not necessarily trying to define
I'm not clear if you mean within the context of Swagger or in general. The class is defined within the same package, so it's not a typo or undeclared. As mentioned previously I had to refactor all of the Also, we're using this project directly. |
What I mean is, if the declared type is the same, the case class MyModel(
@ApiModelProperty(dataType = "com.org.full.big.long.classpath.but.defined.in.same.file.as.this.annotation.MyClassOfInterest")
myProperty: MyClassOfInterest
)
case class MyModel(
@ApiModelProperty
myProperty: MyClassOfInterest
)
case class MyModel(
myProperty: MyClassOfInterest
) Does Play 2.7 work for you with |
I'm upgrading a Scala + Play app (2.11.8 --> 2.12.8 and 2.5.12 --> 2.8.16, respectively) and was having issues upgrading to 1.7.1 of io.swagger:swagger-play2, presumably due to transient dependencies as described in https://stackoverflow.com/a/68015459, which is how I discovered this fork.
Since switching to this fork in my upgrade branch, I did initially experience numerous
ClassNotFoundException
errors relating to thedataType
field underApiImplicitParam
, which I was able to resolve by switching over to usingdataTypeClass
andclassOf
per swagger-api#174.However, I experienced a very similar error coming from an
@ApiModelProperty
annotation, like:resulting in:
I was not able to resolve this exception in a similar manner to
ApiImplicitParam
as it appears thedataTypeClass
is not available forApiModelProperty
. Is this a remaining / known bug or likely user error? Suggestions / workarounds?The text was updated successfully, but these errors were encountered: