{"action":"closed","issue":{"url":"https://api.github.com/repos/spotify/ramlfications/issues/44","labels_url":"https://api.github.com/repos/spotify/ramlfications/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/spotify/ramlfications/issues/44/comments","events_url":"https://api.github.com/repos/spotify/ramlfications/issues/44/events","html_url":"https://github.com/spotify/ramlfications/issues/44","id":104886070,"number":44,"title":"Optional properties of resource types applies to differently named properties of resources","user":{"login":"xaratt","id":47265,"avatar_url":"https://avatars.githubusercontent.com/u/47265?v=3","gravatar_id":"","url":"https://api.github.com/users/xaratt","html_url":"https://github.com/xaratt","followers_url":"https://api.github.com/users/xaratt/followers","following_url":"https://api.github.com/users/xaratt/following{/other_user}","gists_url":"https://api.github.com/users/xaratt/gists{/gist_id}","starred_url":"https://api.github.com/users/xaratt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xaratt/subscriptions","organizations_url":"https://api.github.com/users/xaratt/orgs","repos_url":"https://api.github.com/users/xaratt/repos","events_url":"https://api.github.com/users/xaratt/events{/privacy}","received_events_url":"https://api.github.com/users/xaratt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spotify/ramlfications/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/spotify/ramlfications/milestones/1","html_url":"https://github.com/spotify/ramlfications/milestones/0.1.8%20Release","labels_url":"https://api.github.com/repos/spotify/ramlfications/milestones/1/labels","id":1302566,"number":1,"title":"0.1.8 Release","description":"","creator":{"login":"econchick","id":1191069,"avatar_url":"https://avatars.githubusercontent.com/u/1191069?v=3","gravatar_id":"","url":"https://api.github.com/users/econchick","html_url":"https://github.com/econchick","followers_url":"https://api.github.com/users/econchick/followers","following_url":"https://api.github.com/users/econchick/following{/other_user}","gists_url":"https://api.github.com/users/econchick/gists{/gist_id}","starred_url":"https://api.github.com/users/econchick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/econchick/subscriptions","organizations_url":"https://api.github.com/users/econchick/orgs","repos_url":"https://api.github.com/users/econchick/repos","events_url":"https://api.github.com/users/econchick/events{/privacy}","received_events_url":"https://api.github.com/users/econchick/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":1,"state":"open","created_at":"2015-09-12T18:28:52Z","updated_at":"2015-09-12T19:51:49Z","due_on":"2015-09-19T07:00:00Z","closed_at":null},"comments":7,"created_at":"2015-09-04T12:58:49Z","updated_at":"2015-09-12T19:51:49Z","closed_at":"2015-09-12T19:51:49Z","body":"I'm sorry if it's duplicate of [43](https://github.com/spotify/ramlfications/issues/43).\r\n\r\nCurrently if resource type contains a method and resource with this resource type has another method name, resource will contains not only \"own\" parameters (e.g. queryParameters), but parameters from this resource type (e.g. formParameters) too.\r\n\r\nPart of raml-file ([full](https://gist.github.com/xaratt/0393b353f29326b72f95):\r\n```\r\nresourceTypes:\r\n  - collection:\r\n      description: A description of the collection resource type\r\n      post?:\r\n        formParameters:\r\n          ids:\r\n            displayName: IDs\r\n            description: A list of IDs\r\n...\r\n/me:\r\n  /widgets:\r\n    displayName: current-user-saved-widgets\r\n    type: collection\r\n    put:\r\n      description: Save Widgets for Current User\r\n      queryParameters:\r\n        ids:\r\n          displayName: Widget IDs\r\n          type: string\r\n```\r\nAnd ramlfications code calls:\r\n```python\r\n>>> api = ramlfications.parse(\"/tmp/optional-bug-example.raml\")\r\n>>> api.resources\r\n[ResourceNode(method='get', path='/me'), ResourceNode(method='put', path='/me/widgets')]\r\n>>> api.resources[1].resource_type\r\nResourceTypeNode(name='collection')\r\n>>> api.resources[1].query_params\r\n[QueryParameter(name='ids')]\r\n>>> api.resources[1].form_params\r\n[FormParameter(name='ids')]\r\n```\r\nBut resource type collection has formParameters only for optional post method, not for put.\r\n\r\nAnd, second bug(?)\r\n```python\r\n>>> api.resources[1].protocols\r\n['HTTP']\r\n>>> api.resources[1].absolute_uri\r\n'https://example.com/v1/me/widgets'\r\n```\r\nIf I have correct understanding of the raml spec, in this case absolute_uri should starts with HTTP, not HTTPS.\r\n\r\nThanks!"}}