{"action":"created","issue":{"url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/191","repository_url":"https://api.github.com/repos/raml-org/raml-js-parser-2","labels_url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/191/comments","events_url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/191/events","html_url":"https://github.com/raml-org/raml-js-parser-2/issues/191","id":155065299,"number":191,"title":"previous valid 0.8 RAML is invalid now based on my strict validating","user":{"login":"sichvoge","id":498114,"avatar_url":"https://avatars.githubusercontent.com/u/498114?v=3","gravatar_id":"","url":"https://api.github.com/users/sichvoge","html_url":"https://github.com/sichvoge","followers_url":"https://api.github.com/users/sichvoge/followers","following_url":"https://api.github.com/users/sichvoge/following{/other_user}","gists_url":"https://api.github.com/users/sichvoge/gists{/gist_id}","starred_url":"https://api.github.com/users/sichvoge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichvoge/subscriptions","organizations_url":"https://api.github.com/users/sichvoge/orgs","repos_url":"https://api.github.com/users/sichvoge/repos","events_url":"https://api.github.com/users/sichvoge/events{/privacy}","received_events_url":"https://api.github.com/users/sichvoge/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/raml-org/raml-js-parser-2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/raml-org/raml-js-parser-2/labels/raml-0.8","name":"raml-0.8","color":"c2e0c6"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-16T16:20:45Z","updated_at":"2016-05-16T18:11:54Z","closed_at":null,"body":"The new implementation of the RAML 0.8 parser is more strict on validation right now. We need to be careful with that as it has a huge impact on current existing files. Here an example: \r\n\r\n[API_Platform-v2.0.3.zip](https://github.com/raml-org/raml-js-parser-2/files/266441/API_Platform-v2.0.3.zip)\r\n\r\nThe problems with the example file attached:\r\n\r\n* in searchable.yaml: trait `query` defines an empty-valued `example:`\r\n* keys with whitespaces (actually no problem according to the spec, but maybe we should warn here)\r\n* invalid media type (seems that it does not recognize the default media type)\r\n* resource path name gets resolved to the wrong path fragment (might be resolved by #188)\r\n* in collection.yaml: description is empty-valued (was not a problem with 0.8)\r\n\r\nThere are a couple of other problems that makes the project invalid, but these are completely valid cases."},"comment":{"url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/comments/219500750","html_url":"https://github.com/raml-org/raml-js-parser-2/issues/191#issuecomment-219500750","issue_url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/191","id":219500750,"user":{"login":"sichvoge","id":498114,"avatar_url":"https://avatars.githubusercontent.com/u/498114?v=3","gravatar_id":"","url":"https://api.github.com/users/sichvoge","html_url":"https://github.com/sichvoge","followers_url":"https://api.github.com/users/sichvoge/followers","following_url":"https://api.github.com/users/sichvoge/following{/other_user}","gists_url":"https://api.github.com/users/sichvoge/gists{/gist_id}","starred_url":"https://api.github.com/users/sichvoge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichvoge/subscriptions","organizations_url":"https://api.github.com/users/sichvoge/orgs","repos_url":"https://api.github.com/users/sichvoge/repos","events_url":"https://api.github.com/users/sichvoge/events{/privacy}","received_events_url":"https://api.github.com/users/sichvoge/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T18:11:54Z","updated_at":"2016-05-16T18:11:54Z","body":"For the first related to media types. Please have a look at the example, the errors are on those who don't have a media type. So the default media type should be applied right? For example:\r\n\r\n```yaml\r\n      /{apiId}:\r\n        description: An API.\r\n        type: collectionItem\r\n        ...\r\n        get:\r\n          description: Returns an API and all its versions.\r\n          responses:\r\n            200:\r\n              body:\r\n                example: !include examples/api.json\r\n```\r\n\r\nThe error \"invalid media type\" is applied to the example node."}}