You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
> Task :generateSwaggerDocumentation
Problem with loading class: com.example.model.Foo. Mapping from: com.example.model.Foo to: java.lang.String will be ignored.
Problem with loading class: com.example.model.Bar. Mapping from: com.example.model.Bar to: com.example.codec.Baz will be ignored.
Problem with loading class: com.example.codec.Baz. Mapping from: com.example.model.Bar to: com.example.codec.Baz will be ignored.
Ultimately, the issue is that the classes are not available on the buildscript classpath, so ModelModifier's Class.forName fails. This issue did not occur in 0.1.9.
One possible solution would be to load classes using the same classloading logic as is used in the ClassFinder. I think that care might need to be taken here since the JavaType instances will have to be the same for map lookups to work - thus, the two probably need to use the same classloader.
Another solution might be for ModelModifier to track classes by fully qualified name rather than by resolving them to JavaType objects. I'm not clear on the internals of this plugin, so I'm not sure if this is in line with the grand design or not.
The text was updated successfully, but these errors were encountered:
I think I'll tie this in with issue #56. Although it sounds different, it'll be easier to fix it all together as I'm sure fixing the first will just lead to this issue more.
Here's an excerpt from my Gradle config (anonymized):
The content of
buildSrc/src/main/resources/swagger-substitutions.txt
:And here's the task output:
Ultimately, the issue is that the classes are not available on the buildscript classpath, so ModelModifier's Class.forName fails. This issue did not occur in 0.1.9.
One possible solution would be to load classes using the same classloading logic as is used in the ClassFinder. I think that care might need to be taken here since the JavaType instances will have to be the same for map lookups to work - thus, the two probably need to use the same classloader.
Another solution might be for ModelModifier to track classes by fully qualified name rather than by resolving them to JavaType objects. I'm not clear on the internals of this plugin, so I'm not sure if this is in line with the grand design or not.
The text was updated successfully, but these errors were encountered: