{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-modules-java8/issues/59","repository_url":"https://api.github.com/repos/FasterXML/jackson-modules-java8","labels_url":"https://api.github.com/repos/FasterXML/jackson-modules-java8/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-modules-java8/issues/59/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-modules-java8/issues/59/events","html_url":"https://github.com/FasterXML/jackson-modules-java8/issues/59","id":307142141,"number":59,"title":"Missing type ID in java.util.Optional return value in Spring REST controller method","user":{"login":"steffen-harbich-itc","id":19586082,"avatar_url":"https://avatars0.githubusercontent.com/u/19586082?v=4","gravatar_id":"","url":"https://api.github.com/users/steffen-harbich-itc","html_url":"https://github.com/steffen-harbich-itc","followers_url":"https://api.github.com/users/steffen-harbich-itc/followers","following_url":"https://api.github.com/users/steffen-harbich-itc/following{/other_user}","gists_url":"https://api.github.com/users/steffen-harbich-itc/gists{/gist_id}","starred_url":"https://api.github.com/users/steffen-harbich-itc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steffen-harbich-itc/subscriptions","organizations_url":"https://api.github.com/users/steffen-harbich-itc/orgs","repos_url":"https://api.github.com/users/steffen-harbich-itc/repos","events_url":"https://api.github.com/users/steffen-harbich-itc/events{/privacy}","received_events_url":"https://api.github.com/users/steffen-harbich-itc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-21T07:29:38Z","updated_at":"2018-03-21T18:54:21Z","closed_at":null,"author_association":"NONE","body":"Please see my [Stackoverflow question](https://stackoverflow.com/questions/49071166). I have made [a simple example](https://www.dropbox.com/s/719poeehq6z05ac/demo-49071166.zip?dl=0) demonstrating the problem (Spring boot 2, gradle build, call test task). When using Optional as return value of Spring REST controller method then the type ID is not included in the Json response and the client complains about that:\r\n\r\n> Missing type id when trying to resolve subtype of [simple type, class com.example.demo.MySubEntity]: missing type id property 'clazz'\r\n\r\nVersion is 2.9.4. Maybe this is not an issue with the jdk8 module but with Spring REST, I am not sure."},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-modules-java8/issues/comments/375057433","html_url":"https://github.com/FasterXML/jackson-modules-java8/issues/59#issuecomment-375057433","issue_url":"https://api.github.com/repos/FasterXML/jackson-modules-java8/issues/59","id":375057433,"user":{"login":"cowtowncoder","id":55065,"avatar_url":"https://avatars0.githubusercontent.com/u/55065?v=4","gravatar_id":"","url":"https://api.github.com/users/cowtowncoder","html_url":"https://github.com/cowtowncoder","followers_url":"https://api.github.com/users/cowtowncoder/followers","following_url":"https://api.github.com/users/cowtowncoder/following{/other_user}","gists_url":"https://api.github.com/users/cowtowncoder/gists{/gist_id}","starred_url":"https://api.github.com/users/cowtowncoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowtowncoder/subscriptions","organizations_url":"https://api.github.com/users/cowtowncoder/orgs","repos_url":"https://api.github.com/users/cowtowncoder/repos","events_url":"https://api.github.com/users/cowtowncoder/events{/privacy}","received_events_url":"https://api.github.com/users/cowtowncoder/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T18:54:21Z","updated_at":"2018-03-21T18:54:21Z","author_association":"OWNER","body":"Ok, I'd need a reproduction that does not:\r\n\r\n1. Require Spring\r\n2. build using Gradle (stand-alone class is fine)\r\n\r\nto be able to help here.\r\n\r\n"}}
{"actor":{"display_login":"cowtowncoder"}}