-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
NPE thrown in AnnotationUtils due to "API backwards compatibility fix" introduced in 2.2.21 #4645
Comments
Thanks for reporting this. Can you please share the stack trace and ideally a test case reproducing the issue? |
here is a small demo spring boot app created with Spring Initializr. It uses springdoc-openapi 2.5.0 which includes swagger-core 2.2.21. The test Everything works when reverting to swagger-core v2.2.20 The problem appears to be with the processing of response headers. |
fixed in #4650 |
Changes introduced for this issue #4196 introduce NullPointerException due to 'API backwards compatibility' fix in which null is passed to the modified method.
The changes were introduced in this PR: #4608
This results in NPE on line 1387 of AnnotationUtils due to null
components
:https://github.com/swagger-api/swagger-core/blob/d5c37284f5dbb9b6e65858c25d55c1aa2969f8a2/modules/swagger-core/src/main/java/io/swagger/v3/core/util/AnnotationsUtils.java#L1387C58-L1387C58
(I experienced this issue when upgrading springdoc-openapi from 2.4.0 -> v2.5.0, which includes upgrade to swagger-core 2.2.21, which it seems is in fact not backwards compatible!)
The text was updated successfully, but these errors were encountered: