{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4842","repository_url":"https://api.github.com/repos/swagger-api/swagger-ui","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4842/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4842/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4842/events","html_url":"https://github.com/swagger-api/swagger-ui/issues/4842","id":355252815,"node_id":"MDU6SXNzdWUzNTUyNTI4MTU=","number":4842,"title":"Swagger UI renders double brackets when array is used in request body of a post method","user":{"login":"pmallu","id":42786921,"node_id":"MDQ6VXNlcjQyNzg2OTIx","avatar_url":"https://avatars0.githubusercontent.com/u/42786921?v=4","gravatar_id":"","url":"https://api.github.com/users/pmallu","html_url":"https://github.com/pmallu","followers_url":"https://api.github.com/users/pmallu/followers","following_url":"https://api.github.com/users/pmallu/following{/other_user}","gists_url":"https://api.github.com/users/pmallu/gists{/gist_id}","starred_url":"https://api.github.com/users/pmallu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmallu/subscriptions","organizations_url":"https://api.github.com/users/pmallu/orgs","repos_url":"https://api.github.com/users/pmallu/repos","events_url":"https://api.github.com/users/pmallu/events{/privacy}","received_events_url":"https://api.github.com/users/pmallu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-29T17:06:56Z","updated_at":"2018-09-05T07:28:17Z","closed_at":null,"author_association":"NONE","body":"<!---\r\n  Thanks for filing a bug report! 😄\r\n\r\n  Before you submit, please read the following:\r\n\r\n  If you're here to report a security issue, please STOP writing an issue and\r\n  contact us at security@swagger.io instead!\r\n\r\n  Search open/closed issues before submitting!\r\n\r\n  Issues on GitHub are only related to problems of Swagger-UI itself. We'll try\r\n  to offer support here for your use case, but we can't offer help with projects\r\n  that use Swagger-UI indirectly, like Springfox or swagger-node.\r\n\r\n  Likewise, we can't accept bugs in the Swagger/OpenAPI specifications\r\n  themselves, or anything that violates the specifications.\r\n-->\r\n\r\n### Q&A (please complete the following information)\r\n - OS: [e.g. macOS]\r\n     macOS\r\n - Browser: [e.g. chrome, safari]\r\n    chrome\r\n - Version: [e.g. 22]\r\n     \r\n - Method of installation: [e.g. npm, dist assets]\r\n - Swagger-UI version: [e.g. 3.10.0]\r\n    tried online swagger UI\r\n - Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0]\r\nopen api 3.0\r\n\r\n### Content & configuration\r\n<!--\r\n  Provide us with a way to see what you're seeing,\r\n  so that we can fix your issue.\r\n-->\r\n\r\nExample Swagger/OpenAPI definition:\r\n```yaml\r\n# your YAML here\r\n```\r\n\r\nSwagger-UI configuration options:\r\n```js\r\nSwaggerUI({\r\n\"/bulk_fetch_metric\": {\r\n      \"post\": {\r\n        \"description\": \"Obtain one or more static and dynamic variables values from couchbase\",\r\n        \"requestBody\": {\r\n          \"content\": {\r\n            \"application/json\": {\r\n              \"schema\": {\r\n                \"$ref\": \"#/components/schemas/bulkinputParameters\"\r\n              }\r\n            }\r\n          }\r\n        },\r\n        \"responses\": {\r\n          \"200\": {\r\n            \"description\": \"Successful pull of variable information\",\r\n            \"content\": {\r\n              \"application/json\": {\r\n                \"schema\": {\r\n                  \"oneOf\": [\r\n                    {\r\n                      \"$ref\": \"#/components/schemas/derivedVariableOutput\"\r\n                    },\r\n                    {\r\n                      \"$ref\": \"#/components/schemas/storeVariableOutput\"\r\n                    },\r\n                    {\r\n                      \"$ref\": \"#/components/schemas/storeVariableOutputWithDates\"\r\n                    }\r\n                  ]\r\n                }\r\n              }\r\n            }\r\n          },\r\n          \"404\": {\r\n            \"description\": \"The variable name does not exist\"\r\n          }\r\n        }\r\n      }\r\n    },\r\n\"schemas\": {\r\n      \"bulkinputParameters\": {\r\n        \"type\": \"array\",\r\n        \"items\": {\r\n          \"type\": \"object\",\r\n          \"required\": [\r\n            \"requestId\",\r\n            \"entityId\",\r\n            \"variableName\"\r\n          ],\r\n          \"properties\": {\r\n            \"requestId\": {\r\n              \"type\": \"integer\"\r\n            },\r\n            \"entityId\": {\r\n              \"type\": \"string\"\r\n            },\r\n            \"variableName\": {\r\n              \"type\": \"string\"\r\n            },\r\n            \"aggregationType\": {\r\n              \"type\": \"string\"\r\n            },\r\n            \"periodType\": {\r\n              \"type\": \"string\"\r\n            },\r\n            \"numberOfPeriodsBack\": {\r\n              \"type\": \"integer\",\r\n              \"format\": \"int64\"\r\n            },\r\n            \"startDate\": {\r\n              \"type\": \"number\"\r\n            },\r\n            \"endDate\": {\r\n              \"type\": \"number\"\r\n            }\r\n          },\r\n          \"example\": [\r\n            {\r\n              \"requestId\": 1,\r\n              \"entityId\": \"109.153.107.228\",\r\n              \"variableName\": \"cnt_ip4_reg_fpa_90d\"\r\n            },\r\n            {\r\n              \"requestId\": 2,\r\n              \"entityId\": \"01913736084\",\r\n              \"variableName\": \"cnt_phone_reg_fpa_90d\"\r\n            },\r\n            {\r\n              \"requestId\": 3,\r\n              \"entityId\": \"109.153.107\",\r\n              \"variableName\": \"cnt_ip3_reg_fpa_90d\"\r\n            }\r\n          ]\r\n        }\r\n      },\r\n})\r\n```\r\n\r\n```\r\n?yourQueryStringConfig\r\n```\r\n\r\n### Describe the bug you're encountering\r\n<!-- A clear and concise description of what the bug is. -->\r\nWhen an example is defined for a schema of type array in post operation body, then we are seeing double brackets in UI.\r\n![screen shot 2018-08-28 at 2 33 32 pm](https://user-images.githubusercontent.com/42786921/44803391-2bd88900-ab73-11e8-8665-ec7c9cbc90f2.png)\r\n![screen shot 2018-08-28 at 2 34 26 pm](https://user-images.githubusercontent.com/42786921/44803401-34c95a80-ab73-11e8-9cb6-d823488c482c.png)\r\n![screen shot 2018-08-28 at 2 37 51 pm](https://user-images.githubusercontent.com/42786921/44803412-401c8600-ab73-11e8-8f3a-3e1790264e29.png)\r\n\r\n\r\n \r\n### To reproduce...\r\n\r\nSteps to reproduce the behavior:\r\n1. Go to '...'\r\n2. Click on '....'\r\n3. Scroll down to '....'\r\n4. See error\r\n\r\n### Expected behavior\r\n<!-- A clear and concise description of what you expected to happen. -->\r\n\r\n### Screenshots\r\n<!-- If applicable, add screenshots to help explain your problem. -->\r\n\r\n### Additional context or thoughts\r\n<!-- Add any other context about the problem here. -->\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/comments/418627967","html_url":"https://github.com/swagger-api/swagger-ui/issues/4842#issuecomment-418627967","issue_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4842","id":418627967,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODYyNzk2Nw==","user":{"login":"hkosova","id":8576823,"node_id":"MDQ6VXNlcjg1NzY4MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/8576823?v=4","gravatar_id":"","url":"https://api.github.com/users/hkosova","html_url":"https://github.com/hkosova","followers_url":"https://api.github.com/users/hkosova/followers","following_url":"https://api.github.com/users/hkosova/following{/other_user}","gists_url":"https://api.github.com/users/hkosova/gists{/gist_id}","starred_url":"https://api.github.com/users/hkosova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkosova/subscriptions","organizations_url":"https://api.github.com/users/hkosova/orgs","repos_url":"https://api.github.com/users/hkosova/repos","events_url":"https://api.github.com/users/hkosova/events{/privacy}","received_events_url":"https://api.github.com/users/hkosova/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T07:28:17Z","updated_at":"2018-09-05T07:28:17Z","author_association":"CONTRIBUTOR","body":"It works fine for me in the latest Swagger Editor & Swagger UI in Chrome. Please double-check the indentation of `example`.\r\n\r\n![Array example](https://user-images.githubusercontent.com/8576823/45077558-28567c00-b0f6-11e8-89ad-2b1253f4bcb4.png)\r\n"}}
{"actor":{"display_login":"hkosova"}}