{"action":"opened","issue":{"url":"https://api.github.com/repos/raml-org/raml-spec/issues/196","labels_url":"https://api.github.com/repos/raml-org/raml-spec/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/raml-org/raml-spec/issues/196/comments","events_url":"https://api.github.com/repos/raml-org/raml-spec/issues/196/events","html_url":"https://github.com/raml-org/raml-spec/issues/196","id":115522700,"number":196,"title":"The \"parameters\" property in RAML 1.0 annotation type declarations is flawed","user":{"login":"oberlies","id":353942,"avatar_url":"https://avatars.githubusercontent.com/u/353942?v=3","gravatar_id":"","url":"https://api.github.com/users/oberlies","html_url":"https://github.com/oberlies","followers_url":"https://api.github.com/users/oberlies/followers","following_url":"https://api.github.com/users/oberlies/following{/other_user}","gists_url":"https://api.github.com/users/oberlies/gists{/gist_id}","starred_url":"https://api.github.com/users/oberlies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oberlies/subscriptions","organizations_url":"https://api.github.com/users/oberlies/orgs","repos_url":"https://api.github.com/users/oberlies/repos","events_url":"https://api.github.com/users/oberlies/events{/privacy}","received_events_url":"https://api.github.com/users/oberlies/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-06T15:11:30Z","updated_at":"2015-11-06T15:11:30Z","closed_at":null,"body":"In annotations one may want to have something to the right of the colon:\r\n\r\n    (myAnnotation): something\r\n\r\nThe way to specify the format of that \"something\" is through a `parameters` property in the annotation type declaration. According to the spec, that property takes a map of parameter names to types, so e.g.\r\n\r\n    annotationTypes:\r\n      myAnnotation:\r\n        parameters:\r\n          p1: string\r\n          p2: string\r\n\r\nthen allows annotations of the following format:\r\n\r\n    (myAnnotation):\r\n      p1: my value of p1\r\n      p2: my value of p2\r\n\r\nBut then the \"something\" could never be a basic type. The examples and the current parser implementation seem to imply that there is a hack for this: to use the parameter name `value`. So\r\n\r\n    annotationTypes:\r\n      myAnnotation:\r\n        parameters:\r\n          value: string\r\n\r\nallows the following annotation:\r\n\r\n    (myAnnotation): my value\r\n\r\n---\r\n\r\nThis is IMHO a bad design, that could be fixed by replacing the `parameters` property with a `value` property. This property would expect a type reference or inline type as value so that the examples above would look like this:\r\n\r\n    annotationTypes:\r\n      mySimpleAnnotation:\r\n        value: string\r\n      myComplexAnnotation:\r\n        value:\r\n          type: object\r\n          properties:\r\n            p1: string\r\n            p2: string\r\n"}}