{"action":"opened","issue":{"url":"https://api.github.com/repos/mulesoft-labs/raml-dotnet-tools/issues/1","labels_url":"https://api.github.com/repos/mulesoft-labs/raml-dotnet-tools/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mulesoft-labs/raml-dotnet-tools/issues/1/comments","events_url":"https://api.github.com/repos/mulesoft-labs/raml-dotnet-tools/issues/1/events","html_url":"https://github.com/mulesoft-labs/raml-dotnet-tools/issues/1","id":58148573,"number":1,"title":"Using Schemas property to refernece and include schemas results in duplicate classes in ASP.NET Web API","user":{"login":"WadeBarnes","id":10504350,"avatar_url":"https://avatars.githubusercontent.com/u/10504350?v=3","gravatar_id":"","url":"https://api.github.com/users/WadeBarnes","html_url":"https://github.com/WadeBarnes","followers_url":"https://api.github.com/users/WadeBarnes/followers","following_url":"https://api.github.com/users/WadeBarnes/following{/other_user}","gists_url":"https://api.github.com/users/WadeBarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/WadeBarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WadeBarnes/subscriptions","organizations_url":"https://api.github.com/users/WadeBarnes/orgs","repos_url":"https://api.github.com/users/WadeBarnes/repos","events_url":"https://api.github.com/users/WadeBarnes/events{/privacy}","received_events_url":"https://api.github.com/users/WadeBarnes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-18T23:55:08Z","updated_at":"2015-02-18T23:55:08Z","closed_at":null,"body":"From the following RAML four classes end up being created:\r\n* Lognote - based on the the schema key reference (lognote).\r\n* LogNoteKeyGetOKResponseContent - based on the /lognotes/{logNoteKey} - Get reference to the schemas key (lognote)\r\n* Lognotes - based on the schema key reference (lognotes).\r\n* LognotesGetOKResponseContent - based on the /lognotes - Get reference to the schemas key (lognotes)\r\n\r\nThe samples use the *OKResponseContent class name for inline schema references.  Where in this cases I would think the schemas key reference is more appropriate choice for the name.\r\n\r\nThe controller implementation then uses a mixture of the generated classes.  Where is would normally be using a single set.\r\n\r\nController Implementation:\r\n<pre>\r\n    [RoutePrefix(\"lognotes\")]\r\n    public partial class LognotesController : ApiController\r\n    {\r\n\r\n\r\n        /// <summary>\r\n\t\t/// Get a list of available lognotes.\r\n\t\t/// </summary>\r\n\t\t/// <returns>Lognotes[]</returns>\r\n        [ResponseType(typeof(Lognotes[]))]\r\n        [HttpGet]\r\n        [Route(\"\")]\r\n        public virtual IHttpActionResult GetBase()\r\n        {\r\n            // Do not modify this code\r\n            return ((ILognotesController)this).Get();\r\n        }\r\n\r\n        /// <summary>\r\n\t\t/// Get the specific lognote. \r\n\t\t/// </summary>\r\n\t\t/// <param name=\"logNoteKey\"></param>\r\n\t\t/// <returns>LogNoteKeyGetOKResponseContent</returns>\r\n        [ResponseType(typeof(LogNoteKeyGetOKResponseContent))]\r\n        [HttpGet]\r\n        [Route(\"{logNoteKey}\")]\r\n        public virtual IHttpActionResult GetByLogNoteKeyBase([FromUri] string logNoteKey)\r\n        {\r\n            // Do not modify this code\r\n            return ((ILognotesController)this).GetByLogNoteKey(logNoteKey);\r\n        }\r\n    }\r\n</pre>\r\n\r\nSource RAML:\r\n<pre>\r\n#%RAML 0.8\r\n---\r\ntitle: DARS\r\nversion: 0.0.1\r\nprotocols: [HTTPS]\r\nbaseUri: https://test\r\nmediaType: application/json\r\nsecuredBy: [basic]\r\n\r\nsecuritySchemes:\r\n  - basic:\r\n      type: Basic Authentication\r\n\r\nschemas:\r\n - lognote: !include ./samples/include-lognote.schema\r\n - lognotes: !include ./samples/include-lognotes.schema\r\n\r\nresourceTypes:\r\n  - readOnlyCollection:\r\n      get:\r\n        description: Get a list of available <<resourcePathName>>.\r\n        responses:\r\n          200:\r\n            body:\r\n              application/json:\r\n                schema: <<resourcePathName|!pluralize>>\r\n          404:\r\n            body:\r\n              application/json:\r\n                example: |\r\n                  {\"message\": \"No items matching the given criteria were found.\"}\r\n\r\n  - readOnlyCollectionItem:\r\n      get:\r\n        description: |\r\n          Get the specific <<resourcePathName|!singularize>>.\r\n        responses:\r\n          200:\r\n            body:\r\n              application/json:\r\n                schema: <<resourcePathName|!singularize>>\r\n          404:\r\n            body:\r\n              application/json:\r\n                example: |\r\n                  {\"message\": \"File could not be found.\"}\r\n\r\n/lognotes:\r\n  type:\r\n    readOnlyCollection:\r\n  /{logNoteKey}:\r\n    type:\r\n      readOnlyCollectionItem:\r\n</pre>"}}