-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
NullPointerException when annotations are unavailable (not defined or private) #378
Comments
Please provide a full reproducible use case. Also note that I am abandoning Akka in favour of Pekko. |
Even provide the stack trace. That partial example is not very useful |
I was building on different machine reproduction without a similar result.
On plain project after i added this and had definitions of endpoints as private then NPE is thrown.
When i changed firstApi to public from private then swagger.json is generated properly.
When both endpoints are private and unwantedDefinitions are removed then it generates properly.
|
I'm writing this because this could be helpfull for pekko too maybe. |
I did reproduction here https://github.com/Randerspl/akka-swagger-npe. |
Hello, today i found that when in akka http all endpoints are set as private or no annotations are defined
generateSwaggerJson
will throw NullPointerException.I now know that it was my mistake, but debugging NPE was time consuming and misleading.
I had code similar to this:
I think custom error message like "No annotations found" would be better for future developers.
The text was updated successfully, but these errors were encountered: