-
Notifications
You must be signed in to change notification settings - Fork 46
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
Getting a NullPointerException at java.util.TreeMap.putAll (TreeMap:312) #85
Comments
Thanks for reporting this. While this should certainly not happen it seems to be a result of no endpoints being discovered. Do you have any JAX-RS annotated resources in I'll make sure we do a NPE for this. The 2.1.3 introduced sorting of the resource paths (and other things) to ensure a deterministic output from running the generation and this indeed seems to be an issue from the sorting when no resource paths has been discovered. |
No, I don't have any JAX-RS annotated resources. I thought maybe this plugin would work with @Api* annotated classes, now I know it doesn't. |
It is intended to work with JAX-RS annotations - the same as Swagger basically. But shouldn't be throwing around NPE's anyway :) |
Before hitting #96 I was running into this issue, but I cannot really tell at what point unfortunately. This definitely is affecting a couple of folks. Edit: Could reproduce by just using it: <plugin>
<groupId>io.openapitools.swagger</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>2.1.4</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin> I'm using JAX-RS. |
It looks like As for the NPE, my fix was to actually configure
|
With 2.1.2 version, the result is only this:
With 2.1.3 up to 2.1.5, the result is |
I had similar issue at java.util.Map.size(), |
Describe the bug
I'm getting a NullPointerException at java.util.TreeMap.putAll (TreeMap:312) after adding the plugin to my project.
To Reproduce
This is how I defined the plugin in my POM file:
Expected behavior
I expected the project to build properly and generate the JSON and YAML files.
Additional context
I'm experiencing this issue with versions from 2.1.3 to 2.1.6 (latest as of report date). It works with 2.1.2.
The text was updated successfully, but these errors were encountered: