{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/955","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/955/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/955/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/955/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/955","id":93591140,"number":955,"title":"C# generator does not escape conflicting member names","user":{"login":"danze","id":2996622,"avatar_url":"https://avatars.githubusercontent.com/u/2996622?v=3","gravatar_id":"","url":"https://api.github.com/users/danze","html_url":"https://github.com/danze","followers_url":"https://api.github.com/users/danze/followers","following_url":"https://api.github.com/users/danze/following{/other_user}","gists_url":"https://api.github.com/users/danze/gists{/gist_id}","starred_url":"https://api.github.com/users/danze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danze/subscriptions","organizations_url":"https://api.github.com/users/danze/orgs","repos_url":"https://api.github.com/users/danze/repos","events_url":"https://api.github.com/users/danze/events{/privacy}","received_events_url":"https://api.github.com/users/danze/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Client:%20C-Sharp","name":"Client: C-Sharp","color":"fad8c7"},{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Need%20community%20contribution","name":"Need community contribution","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/8","html_url":"https://github.com/swagger-api/swagger-codegen/milestones/v2.1.5","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/8/labels","id":1295192,"number":8,"title":"v2.1.5","description":"","creator":{"login":"webron","id":241629,"avatar_url":"https://avatars.githubusercontent.com/u/241629?v=3","gravatar_id":"","url":"https://api.github.com/users/webron","html_url":"https://github.com/webron","followers_url":"https://api.github.com/users/webron/followers","following_url":"https://api.github.com/users/webron/following{/other_user}","gists_url":"https://api.github.com/users/webron/gists{/gist_id}","starred_url":"https://api.github.com/users/webron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webron/subscriptions","organizations_url":"https://api.github.com/users/webron/orgs","repos_url":"https://api.github.com/users/webron/repos","events_url":"https://api.github.com/users/webron/events{/privacy}","received_events_url":"https://api.github.com/users/webron/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":48,"state":"open","created_at":"2015-09-08T12:37:46Z","updated_at":"2015-11-06T13:01:31Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-07-07T18:01:15Z","updated_at":"2015-11-06T14:13:12Z","closed_at":null,"body":"The C# code generator does not escape member names that are the same as their enclosing type. For example:\r\n\r\n```csharp\r\nnamespace IO.Swagger.Model\r\n{\r\n  [DataContract]\r\n  public class Capacities\r\n  {\r\n    [DataMember(Name=\"capacities\", EmitDefaultValue=false)]\r\n    public List<Capacity> Capacities { get; set; }\r\n  }\r\n}\r\n```\r\n\r\nIn the above code, the \"Capacities\" property conflicts with the class name which is also \"Capacities\". The C# language does not allow this and the Swagger codegen should escape this to may be \"_Capacities\".\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments/154418726","html_url":"https://github.com/swagger-api/swagger-codegen/issues/955#issuecomment-154418726","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/955","id":154418726,"user":{"login":"smwurster","id":15654576,"avatar_url":"https://avatars.githubusercontent.com/u/15654576?v=3","gravatar_id":"","url":"https://api.github.com/users/smwurster","html_url":"https://github.com/smwurster","followers_url":"https://api.github.com/users/smwurster/followers","following_url":"https://api.github.com/users/smwurster/following{/other_user}","gists_url":"https://api.github.com/users/smwurster/gists{/gist_id}","starred_url":"https://api.github.com/users/smwurster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smwurster/subscriptions","organizations_url":"https://api.github.com/users/smwurster/orgs","repos_url":"https://api.github.com/users/smwurster/repos","events_url":"https://api.github.com/users/smwurster/events{/privacy}","received_events_url":"https://api.github.com/users/smwurster/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T14:13:12Z","updated_at":"2015-11-06T14:13:12Z","body":":+1:   This affects me as well, although thankfully it only affects 2 classes and for now I can easily work around it by hand-modifying those as needed.\r\n\r\nA quick look at the code shows that it doesn't seem to be that easy of a fix.  Looks like the model name isn't provided to the variable name function.  Some refactoring seems to be in order."}}