{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1970","repository_url":"https://api.github.com/repos/swagger-api/swagger-core","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1970/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1970/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1970/events","html_url":"https://github.com/swagger-api/swagger-core/issues/1970","id":183908660,"number":1970,"title":"io.swagger.util.ReflectionUtils - Failed to resolve 'number' into class","user":{"login":"wizbot88","id":6985401,"avatar_url":"https://avatars.githubusercontent.com/u/6985401?v=3","gravatar_id":"","url":"https://api.github.com/users/wizbot88","html_url":"https://github.com/wizbot88","followers_url":"https://api.github.com/users/wizbot88/followers","following_url":"https://api.github.com/users/wizbot88/following{/other_user}","gists_url":"https://api.github.com/users/wizbot88/gists{/gist_id}","starred_url":"https://api.github.com/users/wizbot88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wizbot88/subscriptions","organizations_url":"https://api.github.com/users/wizbot88/orgs","repos_url":"https://api.github.com/users/wizbot88/repos","events_url":"https://api.github.com/users/wizbot88/events{/privacy}","received_events_url":"https://api.github.com/users/wizbot88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-19T09:20:38Z","updated_at":"2016-10-20T11:25:15Z","closed_at":null,"body":"When I put implicit param annotation with **dataType=\"number\"** on my method.\r\n\r\n`@ApiImplicitParams({@ApiImplicitParam(name = \"param1\", dataType = \"number\", paramType = \"form\", required = true)})`\r\n\r\nEverytime I launch my application, I got a stacktrace as swagger is trying to find the **class number** (which doesn't exist).\r\n\r\nI'm using swagger 1.5.10\r\n\r\n`io.swagger.util.ReflectionUtils - Failed to resolve 'number' into class\r\njava.lang.ClassNotFoundException: number\r\n\tat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) ~[catalina.jar:7.0.42]\r\n\tat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) ~[catalina.jar:7.0.42]\r\n\tat io.swagger.util.ReflectionUtils.loadClassByName(ReflectionUtils.java:44) ~[swagger-core-1.5.10.jar:1.5.10]\r\n\tat io.swagger.util.ReflectionUtils.typeFromString(ReflectionUtils.java:22) ~[swagger-core-1.5.10.jar:1.5.10]\r\n\tat io.swagger.jaxrs.Reader.readImplicitParam(Reader.java:438) [swagger-jaxrs-1.5.10.jar:1.5.10]\r\n\tat io.swagger.jaxrs.Reader.readImplicitParameters(Reader.java:414) [swagger-jaxrs-1.5.10.jar:1.5.10]\r\n\tat io.swagger.jaxrs.Reader.read(Reader.java:401) [swagger-jaxrs-1.5.10.jar:1.5.10]\r\n\tat io.swagger.jaxrs.Reader.read(Reader.java:150) [swagger-jaxrs-1.5.10.jar:1.5.10]\r\n\tat io.swagger.jaxrs.config.BeanConfig.scanAndRead(BeanConfig.java:235) [swagger-jaxrs-1.5.10.jar:1.5.10]\r\n\tat io.swagger.jaxrs.config.BeanConfig.setScan(BeanConfig.java:214) [swagger-jaxrs-1.5.10.jar:1.5.10]`\r\n\r\nHowever everything is working fine with **swagger-ui** or **swagger-codegen** as number dataType is part of the swagger specification."},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/comments/255079649","html_url":"https://github.com/swagger-api/swagger-core/issues/1970#issuecomment-255079649","issue_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1970","id":255079649,"user":{"login":"wizbot88","id":6985401,"avatar_url":"https://avatars.githubusercontent.com/u/6985401?v=3","gravatar_id":"","url":"https://api.github.com/users/wizbot88","html_url":"https://github.com/wizbot88","followers_url":"https://api.github.com/users/wizbot88/followers","following_url":"https://api.github.com/users/wizbot88/following{/other_user}","gists_url":"https://api.github.com/users/wizbot88/gists{/gist_id}","starred_url":"https://api.github.com/users/wizbot88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wizbot88/subscriptions","organizations_url":"https://api.github.com/users/wizbot88/orgs","repos_url":"https://api.github.com/users/wizbot88/repos","events_url":"https://api.github.com/users/wizbot88/events{/privacy}","received_events_url":"https://api.github.com/users/wizbot88/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T11:25:15Z","updated_at":"2016-10-20T11:25:15Z","body":"Thanks for the answer.\r\n\r\nActually, when I try with `java.math.BigDecimal`, I don't have an exception anymore.\r\nBut in my swagger.json you can find \r\n`\"parameters\":[{\"name\":\"param1\",\"in\":\"formData\",\"required\":true,\"type\":\"java.math.BigDecimal\"}]`\r\nThe type `\"type\":\"java.math.BigDecimal\"` doesn't make any sense in the swagger.json as it is not part of the swagger-spec.\r\n\r\nI understand that I have to match a java class in my code to properly override the **dataType**.\r\nHowever this **dataType** should be translated into a proper **swagger spec dataType** (in this case `number`)\r\n\r\nMy question is : \"is it how this annotation should work ?\""}}
{"actor":{"display_login":"wizbot88"}}