Skip to content
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 in swagger core #1707

Closed
Kvezon opened this issue Mar 10, 2016 · 5 comments · Fixed by #1710 or #1711
Closed

NPE in swagger core #1707

Kvezon opened this issue Mar 10, 2016 · 5 comments · Fixed by #1710 or #1711
Milestone

Comments

@Kvezon
Copy link

Kvezon commented Mar 10, 2016

Tried to move to 1.5.7 and use filter for unused definitions from #1621and got NPE

ERROR [2016-03-09 16:12:45,223] io.swagger.inflector.utils.DefaultExceptionMapper: There was an error processing your request. It has been logged (ID: 1a911a12a64bd0b0).
! java.lang.NullPointerException: null
! at io.swagger.core.filter.SpecFilter.locateNestedReferencedDefinitions(SpecFilter.java:173) ~[swagger-core-1.5.7.jar:1.5.7]
! at io.swagger.core.filter.SpecFilter.removeBrokenReferenceDefinitions(SpecFilter.java:163) ~[swagger-core-1.5.7.jar:1.5.7]
! at io.swagger.core.filter.SpecFilter.filter(SpecFilter.java:94) ~[swagger-core-1.5.7.jar:1.5.7]
! at io.swagger.inflector.controllers.SwaggerResourceController.apply(SwaggerResourceController.java:53) ~[classes/:na]
! at io.swagger.inflector.controllers.SwaggerResourceController.apply(SwaggerResourceController.java:32) ~[classes/:na]

frantuma added a commit that referenced this issue Mar 10, 2016
Fix #1707 - Fix NPE in case of model with no props
@frantuma
Copy link
Member

@Kvezon I guess you had a model without properties or filtered out properties which caused NPE, fixed in #1710 will be part of v1.5.8

@fehguy
Copy link
Contributor

fehguy commented Mar 10, 2016

@Kvezon please confirm? We are trying to release tomorrow.

@frantuma frantuma added this to the v1.5.8 milestone Mar 10, 2016
@Kvezon
Copy link
Author

Kvezon commented Mar 11, 2016

NPE was fixed. But the problems is not fixed completely. For example we have definitions 'def1' and 'def2', 'def1' has a link to 'def2' and this two definitions are not used anywhere. 'def1' will be deleted, 'def2' will not because there were links in 'def1'.

@frantuma
Copy link
Member

@Kvezon you're right, this is fixed in #1711, can you confirm it solves issue you mentioned?

@frantuma frantuma reopened this Mar 11, 2016
frantuma added a commit that referenced this issue Mar 11, 2016
Fix #1707 - correctly remove unused nested definitions
@Kvezon
Copy link
Author

Kvezon commented Mar 11, 2016

@frantuma Looks like fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants