{"action":"created","issue":{"url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/681","repository_url":"https://api.github.com/repos/OAI/OpenAPI-Specification","labels_url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/681/labels{/name}","comments_url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/681/comments","events_url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/681/events","html_url":"https://github.com/OAI/OpenAPI-Specification/issues/681","id":153267069,"node_id":"MDU6SXNzdWUxNTMyNjcwNjk=","number":681,"title":"Integer enum with named items","user":{"login":"kenjitayama","id":48171,"node_id":"MDQ6VXNlcjQ4MTcx","avatar_url":"https://avatars3.githubusercontent.com/u/48171?v=4","gravatar_id":"","url":"https://api.github.com/users/kenjitayama","html_url":"https://github.com/kenjitayama","followers_url":"https://api.github.com/users/kenjitayama/followers","following_url":"https://api.github.com/users/kenjitayama/following{/other_user}","gists_url":"https://api.github.com/users/kenjitayama/gists{/gist_id}","starred_url":"https://api.github.com/users/kenjitayama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenjitayama/subscriptions","organizations_url":"https://api.github.com/users/kenjitayama/orgs","repos_url":"https://api.github.com/users/kenjitayama/repos","events_url":"https://api.github.com/users/kenjitayama/events{/privacy}","received_events_url":"https://api.github.com/users/kenjitayama/received_events","type":"User","site_admin":false},"labels":[{"id":451840760,"node_id":"MDU6TGFiZWw0NTE4NDA3NjA=","url":"https://api.github.com/repos/OAI/OpenAPI-Specification/labels/Post%203.0%20Proposal","name":"Post 3.0 Proposal","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/OAI/OpenAPI-Specification/milestones/8","html_url":"https://github.com/OAI/OpenAPI-Specification/milestone/8","labels_url":"https://api.github.com/repos/OAI/OpenAPI-Specification/milestones/8/labels","id":2472692,"node_id":"MDk6TWlsZXN0b25lMjQ3MjY5Mg==","number":8,"title":"v3.Next","description":"","creator":{"login":"RobDolinMS","id":8301581,"node_id":"MDQ6VXNlcjgzMDE1ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/8301581?v=4","gravatar_id":"","url":"https://api.github.com/users/RobDolinMS","html_url":"https://github.com/RobDolinMS","followers_url":"https://api.github.com/users/RobDolinMS/followers","following_url":"https://api.github.com/users/RobDolinMS/following{/other_user}","gists_url":"https://api.github.com/users/RobDolinMS/gists{/gist_id}","starred_url":"https://api.github.com/users/RobDolinMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobDolinMS/subscriptions","organizations_url":"https://api.github.com/users/RobDolinMS/orgs","repos_url":"https://api.github.com/users/RobDolinMS/repos","events_url":"https://api.github.com/users/RobDolinMS/events{/privacy}","received_events_url":"https://api.github.com/users/RobDolinMS/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":0,"state":"open","created_at":"2017-04-21T17:00:58Z","updated_at":"2017-07-07T16:53:40Z","due_on":"2017-11-01T07:00:00Z","closed_at":null},"comments":26,"created_at":"2016-05-05T16:16:49Z","updated_at":"2018-11-15T16:28:42Z","closed_at":null,"author_association":"NONE","body":"I would like to propose a new field called `enumNames`.\n\nExample:\n\n``` yaml\ndefinitions:\n  weather:\n    type: object\n    required:\n      - type\n    properties:\n      type:\n        type: integer\n        format: int32\n        enum:\n          - 1\n          - 2\n          - 3\n        enumNames:\n          - Sunny\n          - Cloudy\n          - Rainy\n```\n\nThis information is necessary for generating the following Java enum.\n\n``` java\npublic enum Weather {\n    Sunny(1),\n    Cloudy(2),\n    Rainy(3);\n\n    private final int type;\n\n    private Weather(final int type) {\n        this.type = type;\n    }\n\n    public type getType() {\n        return type;\n    }\n}\n```\n\nSome web APIs require clients to send/retrieve integer enum items while knowing what they mean. So it is useful to be able to generate this kind of enum.\n\nI had been seeking advice in the following swagger-codegen issue, and got a conclusion that we need a vendor extension (which corresponds to this proposal) using Swagger 2.0 spec.\nhttps://github.com/swagger-api/swagger-codegen/issues/2690\n"},"comment":{"url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/comments/439101641","html_url":"https://github.com/OAI/OpenAPI-Specification/issues/681#issuecomment-439101641","issue_url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/681","id":439101641,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTEwMTY0MQ==","user":{"login":"rlabrecque","id":2047188,"node_id":"MDQ6VXNlcjIwNDcxODg=","avatar_url":"https://avatars3.githubusercontent.com/u/2047188?v=4","gravatar_id":"","url":"https://api.github.com/users/rlabrecque","html_url":"https://github.com/rlabrecque","followers_url":"https://api.github.com/users/rlabrecque/followers","following_url":"https://api.github.com/users/rlabrecque/following{/other_user}","gists_url":"https://api.github.com/users/rlabrecque/gists{/gist_id}","starred_url":"https://api.github.com/users/rlabrecque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlabrecque/subscriptions","organizations_url":"https://api.github.com/users/rlabrecque/orgs","repos_url":"https://api.github.com/users/rlabrecque/repos","events_url":"https://api.github.com/users/rlabrecque/events{/privacy}","received_events_url":"https://api.github.com/users/rlabrecque/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T16:28:42Z","updated_at":"2018-11-15T16:28:42Z","author_association":"NONE","body":"Yeah, I think that would definitely be ideal!"}}
{"actor":{"display_login":"rlabrecque"}}