{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1311","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1311/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1311/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1311/events","html_url":"https://github.com/swagger-api/swagger-core/issues/1311","id":98261755,"number":1311,"title":"SpecFilter throws NPE when processing 'ComposedModel' definitions","user":{"login":"owagould","id":11181567,"avatar_url":"https://avatars.githubusercontent.com/u/11181567?v=3","gravatar_id":"","url":"https://api.github.com/users/owagould","html_url":"https://github.com/owagould","followers_url":"https://api.github.com/users/owagould/followers","following_url":"https://api.github.com/users/owagould/following{/other_user}","gists_url":"https://api.github.com/users/owagould/gists{/gist_id}","starred_url":"https://api.github.com/users/owagould/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owagould/subscriptions","organizations_url":"https://api.github.com/users/owagould/orgs","repos_url":"https://api.github.com/users/owagould/repos","events_url":"https://api.github.com/users/owagould/events{/privacy}","received_events_url":"https://api.github.com/users/owagould/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-30T20:51:05Z","updated_at":"2015-08-11T21:28:32Z","closed_at":null,"body":"In swagger-core 1.5.0,   I'm getting an NPE when trying to implement my own SwaggerSpecFilter:\r\n\r\n```\r\njava.lang.NullPointerException: null\r\n\tat io.swagger.core.filter.SpecFilter.filterDefinitions(SpecFilter.java:69) ~[swagger-core-1.5.0.jar:1.5.0]\r\n\tat io.swagger.core.filter.SpecFilter.filter(SpecFilter.java:54) ~[swagger-core-1.5.0.jar:1.5.0]\r\n\tat io.swagger.jaxrs.listing.ApiListingResource.getListingJson(ApiListingResource.java:98) ~[swagger-jaxrs-1.5.0.jar:1.5.0]\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]\r\n```\r\n\r\n\r\n_io.swagger.core.filter.SpecFilter (line 69)\r\n```\r\n...\r\n67            Model definition = definitions.get(key);\r\n68            Map<String, Property> clonedProperties = new LinkedHashMap<String, Property>();\r\n69            for (String propName : definition.getProperties().keySet()) {\r\n70                Property property = definition.getProperties().get(propName);\r\n...\r\n```\r\n\r\nIt's happening when the type of  'definition' is 'ComposedModel', which  appears to be  hard-coded to return null on getProperties().  The model being inspected is a sub-classed model.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/comments/130083577","html_url":"https://github.com/swagger-api/swagger-core/issues/1311#issuecomment-130083577","issue_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1311","id":130083577,"user":{"login":"lmprice","id":1957930,"avatar_url":"https://avatars.githubusercontent.com/u/1957930?v=3","gravatar_id":"","url":"https://api.github.com/users/lmprice","html_url":"https://github.com/lmprice","followers_url":"https://api.github.com/users/lmprice/followers","following_url":"https://api.github.com/users/lmprice/following{/other_user}","gists_url":"https://api.github.com/users/lmprice/gists{/gist_id}","starred_url":"https://api.github.com/users/lmprice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmprice/subscriptions","organizations_url":"https://api.github.com/users/lmprice/orgs","repos_url":"https://api.github.com/users/lmprice/repos","events_url":"https://api.github.com/users/lmprice/events{/privacy}","received_events_url":"https://api.github.com/users/lmprice/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T21:28:32Z","updated_at":"2015-08-11T21:28:32Z","body":"+1"}}