{"action":"closed","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1447","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1447/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1447/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1447/events","html_url":"https://github.com/swagger-api/swagger-core/issues/1447","id":107494026,"number":1447,"title":"Swagger 2.0 + Jackson: @JsonIdentityInfo doesn't work","user":{"login":"thomasbeauvais","id":1192386,"avatar_url":"https://avatars.githubusercontent.com/u/1192386?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasbeauvais","html_url":"https://github.com/thomasbeauvais","followers_url":"https://api.github.com/users/thomasbeauvais/followers","following_url":"https://api.github.com/users/thomasbeauvais/following{/other_user}","gists_url":"https://api.github.com/users/thomasbeauvais/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasbeauvais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasbeauvais/subscriptions","organizations_url":"https://api.github.com/users/thomasbeauvais/orgs","repos_url":"https://api.github.com/users/thomasbeauvais/repos","events_url":"https://api.github.com/users/thomasbeauvais/events{/privacy}","received_events_url":"https://api.github.com/users/thomasbeauvais/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"lugaru1234","id":11853296,"avatar_url":"https://avatars.githubusercontent.com/u/11853296?v=3","gravatar_id":"","url":"https://api.github.com/users/lugaru1234","html_url":"https://github.com/lugaru1234","followers_url":"https://api.github.com/users/lugaru1234/followers","following_url":"https://api.github.com/users/lugaru1234/following{/other_user}","gists_url":"https://api.github.com/users/lugaru1234/gists{/gist_id}","starred_url":"https://api.github.com/users/lugaru1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lugaru1234/subscriptions","organizations_url":"https://api.github.com/users/lugaru1234/orgs","repos_url":"https://api.github.com/users/lugaru1234/repos","events_url":"https://api.github.com/users/lugaru1234/events{/privacy}","received_events_url":"https://api.github.com/users/lugaru1234/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-09-21T11:43:04Z","updated_at":"2015-10-12T05:02:28Z","closed_at":"2015-10-12T05:02:28Z","body":"Referencing: http://stackoverflow.com/posts/32692609/edit\r\n\r\nWe are attempting to have Swagger 2.0.  Basically, it's great except it is ignoring the @JsonIdentityInfo and @JsonIdentityReference annotations.\r\n\r\n    public class Source {\r\n        @Id\r\n        @GeneratedValue(strategy = GenerationType.IDENTITY)\r\n        private Long id;\r\n\r\n        @ManyToOne\r\n        @JsonIdentityReference(alwaysAsId=true)\r\n        @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"name\")\r\n        @JsonProperty(\"sourceDefinitionName\")\r\n        private SourceDefinition sourceDefinition;\r\n\r\n        ... getters and setters\r\n    }\r\n\r\nResulting in the Swagger schema output:\r\n\r\n    {\r\n         \"id\": 0,\r\n         \"sourceDefinitionName\": {\r\n              \"configuration\": {},\r\n              \"driver\": \"string\",\r\n              \"id\": \"string\",\r\n              \"name\": \"string\",\r\n              \"sourceType\": \"QUERY\",\r\n              \"title\": \"string\"\r\n         }\r\n    }\r\n\r\nYou can see that it indeed reads the @JsonProperty annotation renaming the \"sourceDefinition\" to \"sourceDefinitionName\" but the value should just be a string.\r\n\r\nDoes anyone have any insight into this sort of problem with this integration?"}}