{"action":"closed","issue":{"url":"https://api.github.com/repos/networknt/light-codegen/issues/158","repository_url":"https://api.github.com/repos/networknt/light-codegen","labels_url":"https://api.github.com/repos/networknt/light-codegen/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/networknt/light-codegen/issues/158/comments","events_url":"https://api.github.com/repos/networknt/light-codegen/issues/158/events","html_url":"https://github.com/networknt/light-codegen/issues/158","id":333549723,"node_id":"MDU6SXNzdWUzMzM1NDk3MjM=","number":158,"title":"Binary Content","user":{"login":"cbehrenberg","id":4690889,"node_id":"MDQ6VXNlcjQ2OTA4ODk=","avatar_url":"https://avatars2.githubusercontent.com/u/4690889?v=4","gravatar_id":"","url":"https://api.github.com/users/cbehrenberg","html_url":"https://github.com/cbehrenberg","followers_url":"https://api.github.com/users/cbehrenberg/followers","following_url":"https://api.github.com/users/cbehrenberg/following{/other_user}","gists_url":"https://api.github.com/users/cbehrenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/cbehrenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbehrenberg/subscriptions","organizations_url":"https://api.github.com/users/cbehrenberg/orgs","repos_url":"https://api.github.com/users/cbehrenberg/repos","events_url":"https://api.github.com/users/cbehrenberg/events{/privacy}","received_events_url":"https://api.github.com/users/cbehrenberg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"243826","id":2702787,"node_id":"MDQ6VXNlcjI3MDI3ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/2702787?v=4","gravatar_id":"","url":"https://api.github.com/users/243826","html_url":"https://github.com/243826","followers_url":"https://api.github.com/users/243826/followers","following_url":"https://api.github.com/users/243826/following{/other_user}","gists_url":"https://api.github.com/users/243826/gists{/gist_id}","starred_url":"https://api.github.com/users/243826/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/243826/subscriptions","organizations_url":"https://api.github.com/users/243826/orgs","repos_url":"https://api.github.com/users/243826/repos","events_url":"https://api.github.com/users/243826/events{/privacy}","received_events_url":"https://api.github.com/users/243826/received_events","type":"User","site_admin":false},"assignees":[{"login":"243826","id":2702787,"node_id":"MDQ6VXNlcjI3MDI3ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/2702787?v=4","gravatar_id":"","url":"https://api.github.com/users/243826","html_url":"https://github.com/243826","followers_url":"https://api.github.com/users/243826/followers","following_url":"https://api.github.com/users/243826/following{/other_user}","gists_url":"https://api.github.com/users/243826/gists{/gist_id}","starred_url":"https://api.github.com/users/243826/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/243826/subscriptions","organizations_url":"https://api.github.com/users/243826/orgs","repos_url":"https://api.github.com/users/243826/repos","events_url":"https://api.github.com/users/243826/events{/privacy}","received_events_url":"https://api.github.com/users/243826/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-06-19T07:27:53Z","updated_at":"2019-03-20T02:16:51Z","closed_at":"2019-03-20T02:16:51Z","author_association":"NONE","body":"Hello,\r\nI believe the treatment of binary content is not right for type generation.\r\n\r\nAccording to [https://swagger.io/docs/specification/describing-responses/#response-that-returns-a-file](https://swagger.io/docs/specification/describing-responses/#response-that-returns-a-file) you can specify with type: string + format: binary a byte array (like byte[]) and with type: string + format: byte base64 encoded byte content.\r\n\r\nHowever, in both cases, a String object is generated for me (which is not correct for me, I expect byte[]). When I use Swagger Editor and generate a Java Client, however, a byte array is created (which looks correct to me).\r\n\r\nI believe it is related to the typeMapping in class SwaggerGenerator, as it generates byte[] only if type == \"ByteArray\" or \"binary\" in my OpenAPI spec. I tested it - it generates byte[]. However, this violates OpenAPI spec and the editor goes nuts...\r\n\r\nCan you please verify?"}}
{"actor":{"display_login":"stevehu"}}