{"action":"opened","issue":{"url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/403","repository_url":"https://api.github.com/repos/glennjones/hapi-swagger","labels_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/403/labels{/name}","comments_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/403/comments","events_url":"https://api.github.com/repos/glennjones/hapi-swagger/issues/403/events","html_url":"https://github.com/glennjones/hapi-swagger/issues/403","id":212187127,"number":403,"title":"x-meta fields after response field merge","user":{"login":"larromba","id":676915,"avatar_url":"https://avatars3.githubusercontent.com/u/676915?v=3","gravatar_id":"","url":"https://api.github.com/users/larromba","html_url":"https://github.com/larromba","followers_url":"https://api.github.com/users/larromba/followers","following_url":"https://api.github.com/users/larromba/following{/other_user}","gists_url":"https://api.github.com/users/larromba/gists{/gist_id}","starred_url":"https://api.github.com/users/larromba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larromba/subscriptions","organizations_url":"https://api.github.com/users/larromba/orgs","repos_url":"https://api.github.com/users/larromba/repos","events_url":"https://api.github.com/users/larromba/events{/privacy}","received_events_url":"https://api.github.com/users/larromba/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-06T17:06:15Z","updated_at":"2017-03-06T17:06:15Z","closed_at":null,"body":"#### Context\r\n\r\n* *hapi-swgger version*: 7.7.0\r\n* *any other relevant information*: \r\n\r\n#### What are you trying to achieve or the steps to reproduce ?\r\n\r\nCreate a route as below, with a somple Joi schema, and an extra meta data tag\r\n\r\n```js\r\nmethod:...,\r\npath:...,\r\nconfig: {\r\n  response: {\r\n        status: {\r\n          201: MyJoiSchema,\r\n        },\r\n      },\r\n      plugins: {\r\n        'hapi-swagger': {\r\n          responses: {\r\n            201: {\r\n              'x-meta': 'some meta data',\r\n            },\r\n          },\r\n        },\r\n      },\r\n  },\r\n},\r\nhandler: ...\r\n```\r\n\r\n#### What result did you get?\r\n\r\nIt seems if a schema is provided as normal, along with 'extra' fields in the 'hapi-swagger' plugin, the extra fields are lost in the generated swagger json. In the example below, the 'x-meta' field will be lost.\r\n\r\nIf the 'MyJoiSchema' is removed, the 'x-meta' field will not be lost.\r\n\r\n#### What did you expect ?\r\n\r\nI expected the 'x-meta' field to not be lost, even if a Joi schema is given"}}
{"actor":{"display_login":"larromba"}}