{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1318","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1318/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1318/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1318/events","html_url":"https://github.com/swagger-api/swagger-core/issues/1318","id":98830978,"number":1318,"title":"Feature request: @ApiModelProperty example support number type","user":{"login":"ShijunK","id":1540851,"avatar_url":"https://avatars.githubusercontent.com/u/1540851?v=3","gravatar_id":"","url":"https://api.github.com/users/ShijunK","html_url":"https://github.com/ShijunK","followers_url":"https://api.github.com/users/ShijunK/followers","following_url":"https://api.github.com/users/ShijunK/following{/other_user}","gists_url":"https://api.github.com/users/ShijunK/gists{/gist_id}","starred_url":"https://api.github.com/users/ShijunK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShijunK/subscriptions","organizations_url":"https://api.github.com/users/ShijunK/orgs","repos_url":"https://api.github.com/users/ShijunK/repos","events_url":"https://api.github.com/users/ShijunK/events{/privacy}","received_events_url":"https://api.github.com/users/ShijunK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swagger-api/swagger-core/labels/Feature","name":"Feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-core/milestones/18","html_url":"https://github.com/swagger-api/swagger-core/milestones/Future","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/milestones/18/labels","id":1088832,"number":18,"title":"Future","description":"","creator":{"login":"webron","id":241629,"avatar_url":"https://avatars.githubusercontent.com/u/241629?v=3","gravatar_id":"","url":"https://api.github.com/users/webron","html_url":"https://github.com/webron","followers_url":"https://api.github.com/users/webron/followers","following_url":"https://api.github.com/users/webron/following{/other_user}","gists_url":"https://api.github.com/users/webron/gists{/gist_id}","starred_url":"https://api.github.com/users/webron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webron/subscriptions","organizations_url":"https://api.github.com/users/webron/orgs","repos_url":"https://api.github.com/users/webron/repos","events_url":"https://api.github.com/users/webron/events{/privacy}","received_events_url":"https://api.github.com/users/webron/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":9,"state":"open","created_at":"2015-04-29T08:16:30Z","updated_at":"2015-12-04T01:54:45Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-08-03T20:18:17Z","updated_at":"2016-01-29T07:15:22Z","closed_at":null,"body":"I'd like to request a feature which will allow example field of ApiModelProperty support number type. \r\n\r\nFor latest release version (1.5.0), if you use example like this:\r\n````\r\n        @ApiModelProperty(dataType = \"double\", required = true, example = \"1234\")\r\n\tprivate Double numberField;\r\n````\r\n\r\nThe generated swagger spec looks like:\r\n````\r\n \"numberField\" : {\r\n          \"type\" : \"number\",\r\n          \"format\" : \"double\",\r\n          \"example\" : \"1349\"\r\n        }\r\n````\r\n\r\nWhich I believe should be:\r\n````\r\n \"numberField\" : {\r\n          \"type\" : \"number\",\r\n          \"format\" : \"double\",\r\n          \"example\" : 1349\r\n        }\r\n````\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/comments/176611161","html_url":"https://github.com/swagger-api/swagger-core/issues/1318#issuecomment-176611161","issue_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1318","id":176611161,"user":{"login":"etyrrill","id":12614146,"avatar_url":"https://avatars.githubusercontent.com/u/12614146?v=3","gravatar_id":"","url":"https://api.github.com/users/etyrrill","html_url":"https://github.com/etyrrill","followers_url":"https://api.github.com/users/etyrrill/followers","following_url":"https://api.github.com/users/etyrrill/following{/other_user}","gists_url":"https://api.github.com/users/etyrrill/gists{/gist_id}","starred_url":"https://api.github.com/users/etyrrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etyrrill/subscriptions","organizations_url":"https://api.github.com/users/etyrrill/orgs","repos_url":"https://api.github.com/users/etyrrill/repos","events_url":"https://api.github.com/users/etyrrill/events{/privacy}","received_events_url":"https://api.github.com/users/etyrrill/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T07:15:22Z","updated_at":"2016-01-29T07:15:22Z","body":"I have this problem as well, and I took a stab at fixing it.  I left @ApiModelProperty.example a string, but I changed Property.example to an Object, and wrote custom setters for number and boolean properties.  This relatively minor change fixed the problem for me, and has the benefit of not changing how the annotation is used.\r\n"}}