{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/autorest/issues/364","labels_url":"https://api.github.com/repos/Azure/autorest/issues/364/labels{/name}","comments_url":"https://api.github.com/repos/Azure/autorest/issues/364/comments","events_url":"https://api.github.com/repos/Azure/autorest/issues/364/events","html_url":"https://github.com/Azure/autorest/issues/364","id":108396813,"number":364,"title":"Create input class for [HttpGet] method with [FromUri] input (query)","user":{"login":"brenovieira","id":7158650,"avatar_url":"https://avatars.githubusercontent.com/u/7158650?v=3","gravatar_id":"","url":"https://api.github.com/users/brenovieira","html_url":"https://github.com/brenovieira","followers_url":"https://api.github.com/users/brenovieira/followers","following_url":"https://api.github.com/users/brenovieira/following{/other_user}","gists_url":"https://api.github.com/users/brenovieira/gists{/gist_id}","starred_url":"https://api.github.com/users/brenovieira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brenovieira/subscriptions","organizations_url":"https://api.github.com/users/brenovieira/orgs","repos_url":"https://api.github.com/users/brenovieira/repos","events_url":"https://api.github.com/users/brenovieira/events{/privacy}","received_events_url":"https://api.github.com/users/brenovieira/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-25T19:52:58Z","updated_at":"2015-10-30T18:25:49Z","closed_at":null,"body":"I have this method Get on ```ClientController``` with a ```[FromUri]GetClients``` input.\r\n```\r\npublic class ClientController\r\n{\r\n\tpublic Client[] Get([FromUri]GetClients request)\r\n\t{\r\n\t\treturn _clienteDao.Get(request.Condition).ToArray();\r\n\t}\r\n}\r\n```\r\n\r\nThis is part of my class ```GetClients```:\r\n```\r\npublic class GetClients\r\n{\r\n\tpublic string Id { get; set; }\r\n\t\r\n\tpublic string Name { get; set; }\r\n\r\n\tpublic string Email { get; set; }\r\n\r\n\tpublic Func<Client, bool> Condition\r\n\t{\r\n\t\tget\r\n\t\t{\r\n\t\t\treturn c =>\r\n\t\t\t   (string.IsNullOrEmpty(Id) || c.Id.StartsWith(Id)) &&\r\n\t\t\t   (string.IsNullOrEmpty(Name) || c.Name.StartsWith(Name)) &&\r\n\t\t\t   (string.IsNullOrEmpty(Email) || c.Email.StartsWith(Email));\r\n\t\t}\r\n\t}\r\n}\r\n```\r\nUsing swashbuckle, it generates this swagger spec:\r\n```\r\n{\r\n\t\"swagger\": \"2.0\",\r\n\t\"info\": {\r\n\t\t\"version\": \"v1\",\r\n\t\t\"title\": \"API\",\r\n\t\t\"description\": \"API\"\r\n\t},\r\n\t\"host\": \"IP:port\",\r\n\t\"schemes\": [\"http\"],\r\n\t\"paths\": {\r\n\t\t\"/api/clients\": {\r\n\t\t\t\"get\": {\r\n\t\t\t\t...\r\n\t\t\t\t\"parameters\": [{\r\n\t\t\t\t\t\"name\": \"request.id\",\r\n\t\t\t\t\t\"in\": \"query\",\r\n\t\t\t\t\t\"description\": \"Filter by id\",\r\n\t\t\t\t\t\"required\": false,\r\n\t\t\t\t\t\"type\": \"string\"\r\n\t\t\t\t},{\r\n\t\t\t\t\t\"name\": \"request.name\",\r\n\t\t\t\t\t\"in\": \"query\",\r\n\t\t\t\t\t\"description\": \"Filter by name\",\r\n\t\t\t\t\t\"required\": false,\r\n\t\t\t\t\t\"type\": \"string\"\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"request.email\",\r\n\t\t\t\t\t\"in\": \"query\",\r\n\t\t\t\t\t\"description\": \"Filter by email\",\r\n\t\t\t\t\t\"required\": false,\r\n\t\t\t\t\t\"type\": \"string\"\r\n\t\t\t\t},\r\n\t\t\t\t...\r\n\t\t\t\t],\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\t\"definitions\": {\r\n\t\t\"Client\": {\r\n\t\t\t\"required\": [...],\r\n\t\t\t\"type\": \"object\",\r\n\t\t\t\"properties\": {...}\r\n\t\t},\r\n\t\t\"GetClients\": {\r\n\t\t\t\"required\": [...],\r\n\t\t\t\"type\": \"object\",\r\n\t\t\t\"properties\": {\r\n\t\t\t\t\"Id\": {\r\n\t\t\t\t\t\"description\": \"Filter by id\",\r\n\t\t\t\t\t\"type\": \"string\"\r\n\t\t\t\t},\r\n\t\t\t\t\"Name\": {\r\n\t\t\t\t\t\"description\": \"Filter by name\",\r\n\t\t\t\t\t\"type\": \"string\"\r\n\t\t\t\t},\r\n\t\t\t\t\"Email\": {\r\n\t\t\t\t\t\"description\": \"Filter by email\",\r\n\t\t\t\t\t\"type\": \"string\"\r\n\t\t\t\t},\r\n\t\t\t\t...\r\n\t\t\t}\r\n\t\t},\r\n\t\t...\r\n\t}\r\n}\r\n```\r\n\r\nBut ```AutoRest``` generates the related method Get with several parameters (with primitive types) instead of only one input with class type:\r\n```\r\npublic static IList<ClientModel> Get(this IClientOperations operations, string requestid = default(string), string requestname = default(string), string requestemail = default(string))\r\n```\r\ninstead of\r\n```\r\npublic static IList<ClientModel> Get(this IClientOperations operations, GetClients request)\r\n```\r\n\r\nWhat do you think ?\n<!---@tfsbridge:{\"tfsId\":4996540}-->"},"comment":{"url":"https://api.github.com/repos/Azure/autorest/issues/comments/152609166","html_url":"https://github.com/Azure/autorest/issues/364#issuecomment-152609166","issue_url":"https://api.github.com/repos/Azure/autorest/issues/364","id":152609166,"user":{"login":"stankovski","id":857688,"avatar_url":"https://avatars.githubusercontent.com/u/857688?v=3","gravatar_id":"","url":"https://api.github.com/users/stankovski","html_url":"https://github.com/stankovski","followers_url":"https://api.github.com/users/stankovski/followers","following_url":"https://api.github.com/users/stankovski/following{/other_user}","gists_url":"https://api.github.com/users/stankovski/gists{/gist_id}","starred_url":"https://api.github.com/users/stankovski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stankovski/subscriptions","organizations_url":"https://api.github.com/users/stankovski/orgs","repos_url":"https://api.github.com/users/stankovski/repos","events_url":"https://api.github.com/users/stankovski/events{/privacy}","received_events_url":"https://api.github.com/users/stankovski/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T18:25:49Z","updated_at":"2015-10-30T18:25:49Z","body":"Swagger does not support parameter grouping by default as such what Swashbuckle has generated for you is technically correct. We have an extension in Azure.CSharp generator that will group parameters, but it's not currently exposed to generic CSharp code generator."}}