{"action":"created","issue":{"url":"https://api.github.com/repos/Rebilly/ReDoc/issues/358","repository_url":"https://api.github.com/repos/Rebilly/ReDoc","labels_url":"https://api.github.com/repos/Rebilly/ReDoc/issues/358/labels{/name}","comments_url":"https://api.github.com/repos/Rebilly/ReDoc/issues/358/comments","events_url":"https://api.github.com/repos/Rebilly/ReDoc/issues/358/events","html_url":"https://github.com/Rebilly/ReDoc/issues/358","id":265611408,"node_id":"MDU6SXNzdWUyNjU2MTE0MDg=","number":358,"title":"Standalone enum parameters are not displayed correctly in request sample.","user":{"login":"luukp","id":14119301,"node_id":"MDQ6VXNlcjE0MTE5MzAx","avatar_url":"https://avatars2.githubusercontent.com/u/14119301?v=4","gravatar_id":"","url":"https://api.github.com/users/luukp","html_url":"https://github.com/luukp","followers_url":"https://api.github.com/users/luukp/followers","following_url":"https://api.github.com/users/luukp/following{/other_user}","gists_url":"https://api.github.com/users/luukp/gists{/gist_id}","starred_url":"https://api.github.com/users/luukp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luukp/subscriptions","organizations_url":"https://api.github.com/users/luukp/orgs","repos_url":"https://api.github.com/users/luukp/repos","events_url":"https://api.github.com/users/luukp/events{/privacy}","received_events_url":"https://api.github.com/users/luukp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-10-15T22:45:43Z","updated_at":"2018-06-01T14:29:23Z","closed_at":"2018-06-01T14:29:23Z","author_association":"NONE","body":"Some of our operations accept a lone string value with an enum for the request body.  Instead of being displayed as (e.g.) `\"METRIC_LATENCY\"` or `\"string\"` in the request sample, they are displayed as:\r\n```\r\n{\r\n    \"val\": \"METRIC_LATENCY\",\r\n    \"type\": \"string\"\r\n}\r\n```\r\nwhich is incorrect.\r\n\r\nThe attached [swagger.yaml.gz](https://github.com/Rebilly/ReDoc/files/1385889/swagger.yaml.gz) file shows the issue. The \"set domain list description\" operation takes a string value (no enum) and displays the request sample correctly, while the \"update a performance profile's preferred metric\" operation is very similar, but has an enum, and displays the request sample incorrectly.\r\n\r\nIf I change the \"general\" injector to  `return value;` instead of `return {val: value, type: typeof value};` for enum fields, it fixes the issue, but breaks the enum display in other places.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Rebilly/ReDoc/issues/comments/393898160","html_url":"https://github.com/Rebilly/ReDoc/issues/358#issuecomment-393898160","issue_url":"https://api.github.com/repos/Rebilly/ReDoc/issues/358","id":393898160,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzg5ODE2MA==","user":{"login":"RomanGotsiy","id":3975738,"node_id":"MDQ6VXNlcjM5NzU3Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/3975738?v=4","gravatar_id":"","url":"https://api.github.com/users/RomanGotsiy","html_url":"https://github.com/RomanGotsiy","followers_url":"https://api.github.com/users/RomanGotsiy/followers","following_url":"https://api.github.com/users/RomanGotsiy/following{/other_user}","gists_url":"https://api.github.com/users/RomanGotsiy/gists{/gist_id}","starred_url":"https://api.github.com/users/RomanGotsiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RomanGotsiy/subscriptions","organizations_url":"https://api.github.com/users/RomanGotsiy/orgs","repos_url":"https://api.github.com/users/RomanGotsiy/repos","events_url":"https://api.github.com/users/RomanGotsiy/events{/privacy}","received_events_url":"https://api.github.com/users/RomanGotsiy/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T14:29:23Z","updated_at":"2018-06-01T14:29:23Z","author_association":"CONTRIBUTOR","body":"Fixed in redoc@2.0.0-alpha.x"}}
{"actor":{"display_login":"RomanGotsiy"}}