{"action":"opened","issue":{"url":"https://api.github.com/repos/GetShopTV/swagger2/issues/14","labels_url":"https://api.github.com/repos/GetShopTV/swagger2/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/GetShopTV/swagger2/issues/14/comments","events_url":"https://api.github.com/repos/GetShopTV/swagger2/issues/14/events","html_url":"https://github.com/GetShopTV/swagger2/issues/14","id":119292933,"number":14,"title":"Schema name conflicts","user":{"login":"fizruk","id":686582,"avatar_url":"https://avatars.githubusercontent.com/u/686582?v=3","gravatar_id":"","url":"https://api.github.com/users/fizruk","html_url":"https://github.com/fizruk","followers_url":"https://api.github.com/users/fizruk/followers","following_url":"https://api.github.com/users/fizruk/following{/other_user}","gists_url":"https://api.github.com/users/fizruk/gists{/gist_id}","starred_url":"https://api.github.com/users/fizruk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fizruk/subscriptions","organizations_url":"https://api.github.com/users/fizruk/orgs","repos_url":"https://api.github.com/users/fizruk/repos","events_url":"https://api.github.com/users/fizruk/events{/privacy}","received_events_url":"https://api.github.com/users/fizruk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-28T13:04:11Z","updated_at":"2015-11-28T13:04:11Z","closed_at":null,"body":"Hypothetical example:\r\n\r\n```haskell\r\nmodule PhoneBook where\r\n\r\ndata Contact = Contact\r\n  { name :: String\r\n  , phone :: Integer\r\n  } deriving (Generic, ToSchema)\r\n```\r\n\r\n```haskell\r\nmodule MyApp where\r\n\r\nimport qualified PhoneBook\r\n\r\ndata Contact = Contact\r\n  { name :: String\r\n  , phoneContact :: PhoneBook.Contact\r\n  , facebookContact :: String\r\n  , googleContact :: String\r\n  } deriving (Generic, ToSchema)\r\n```\r\n\r\nIn this example both `MyApp.Contact` and `PhoneBook.Contact` have name `\"Contact\"` and therefore schema for `MyApp.Contact` becomes recursive which is wrong.\r\n\r\nPerhaps `datatypeNameModifier` should work with fully qualified names (or it should take module name and datatype name as separate arguments)."}}