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
None of the provided response classes (i.g. FooTracker in the example above) include in any way CompletableFuture or Thread class, however, in swagger models section, after bump, I started seeing:
In some cases the method will be excluded from the swagger (because it
misses httpMethod or Api annotation), but the return type of the method
is added to the definitions as parseMethod() had side effect and
modified the swagger.model object.
Removed the side effect of parseMethod().
The issue is with classes that have extra methods (in same or in parent class), that will be excluded from the swagger - because they do not have @Path, @Api nor @PostMapping. Even if they are ignored from the operations, their model is added to the definitions.
In the next example the produced swagger contains #/definitions/SQLException even if it is not used from the operations or from other definition:
// this static method and return type should not be included in the swagger as there is no Path nor Api
public static SQLException getCauseSQLException(Throwable e) {
return null;
}
The change happened between 3.1.5 and 3.1.6 as part of some fix for JAX-RS. Previously the extra definitions were not included in the resulting swagger.
I prepared a fix that returns the previously behaviour - hope it gets merged soon as it prevents upgrading to newer version of swagger-maven-plugin in our project.
Bump of swagger-maven-plugin from 3.1.5 to 3.1.8 is not backward compatible.
All annotations in my web service look like this:
None of the provided response classes (i.g.
FooTracker
in the example above) include in any way CompletableFuture or Thread class, however, in swagger models section, after bump, I started seeing:I saw that this issue: #782 mentions the exact same problem, however, it has been closed without any explanation or comment from anyone.
The text was updated successfully, but these errors were encountered: