{"action":"closed","issue":{"url":"https://api.github.com/repos/o2r-project/o2r-meta/issues/98","repository_url":"https://api.github.com/repos/o2r-project/o2r-meta","labels_url":"https://api.github.com/repos/o2r-project/o2r-meta/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/o2r-project/o2r-meta/issues/98/comments","events_url":"https://api.github.com/repos/o2r-project/o2r-meta/issues/98/events","html_url":"https://github.com/o2r-project/o2r-meta/issues/98","id":305852013,"node_id":"MDU6SXNzdWUzMDU4NTIwMTM=","number":98,"title":"Error validating metadata","user":{"login":"nuest","id":1325054,"node_id":"MDQ6VXNlcjEzMjUwNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1325054?v=4","gravatar_id":"","url":"https://api.github.com/users/nuest","html_url":"https://github.com/nuest","followers_url":"https://api.github.com/users/nuest/followers","following_url":"https://api.github.com/users/nuest/following{/other_user}","gists_url":"https://api.github.com/users/nuest/gists{/gist_id}","starred_url":"https://api.github.com/users/nuest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuest/subscriptions","organizations_url":"https://api.github.com/users/nuest/orgs","repos_url":"https://api.github.com/users/nuest/repos","events_url":"https://api.github.com/users/nuest/events{/privacy}","received_events_url":"https://api.github.com/users/nuest/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-16T09:14:18Z","updated_at":"2018-07-17T14:22:03Z","closed_at":"2018-07-17T14:22:02Z","author_association":"MEMBER","body":"Currently there is an error saving our demo example \"A question driven ...\". The metadata after uploading and selecting licenses is not valid:\r\n\r\n```JSON\r\n{  \r\n  \"o2r\":{  \r\n    \"upload_type\":\"publication\",\r\n    \"title\":\"A question driven socio-hydrological modeling process\",\r\n    \"temporal\":{  \r\n      \"end\":\"2016-01-15T00:00:00\",\r\n      \"begin\":\"2016-01-15T00:00:00\"\r\n    },\r\n    \"spatial\":{  },\r\n    \"publication_type\":\"other\",\r\n    \"publication_date\":\"2018-03-16T00:00:00.000Z\",\r\n    \"paperLanguage\":[  ],\r\n    \"mainfile_candidates\":[  ],\r\n    \"mainfile\":\"interactiveFigure1.Rmd\",\r\n    \"license\":{  \r\n      \"uibindings\":\"MIT\",\r\n      \"text\":\"CC0-1.0\",\r\n      \"md\":null,\r\n      \"data\":\"CC0-1.0\",\r\n      \"code\":\"MIT\"\r\n    },\r\n    \"keywords\":[  ],\r\n    \"interaction\":[  \r\n\r\n    ],\r\n    \"inputfiles\":[  \r\n      \"SyntheticStreamflow.csv\"\r\n    ],\r\n    \"identifier\":{  \r\n      \"reserveddoi\":null,\r\n      \"doiurl\":\"https://doi.org/doi:10.5194/hess-20-73-2016\",\r\n      \"doi\":\"doi:10.5194/hess-20-73-2016\"\r\n    },\r\n    \"ercIdentifier\":\"gTfIC\",\r\n    \"displayfile_candidates\":[  \r\n      \"table4.PNG\",\r\n      \"A_question_driven.html\",\r\n      \"table1.PNG\",\r\n      \"table2.PNG\",\r\n      \"figure4.PNG\",\r\n      \"figure3.PNG\",\r\n      \"figure89.PNG\",\r\n      \"figure6.PNG\",\r\n      \"figure2.PNG\",\r\n      \"table5.PNG\",\r\n      \"figure1.png\",\r\n      \"table3.PNG\",\r\n      \"figure5.PNG\"\r\n    ],\r\n    \"displayfile\":\"table4.PNG\",\r\n    \"description\":\"Human ... model.\",\r\n    \"depends\":[  ],\r\n    \"creators\":[  ],\r\n    \"communities\":[  \r\n      {  \r\n        \"identifier\":\"o2r\"\r\n      }\r\n    ],\r\n    \"codefiles\":[  ],\r\n    \"access_right\":\"open\"\r\n  }\r\n}\r\n```\r\n\r\nThe error message is \r\n\r\n```JSON\r\n{  \r\n  \"error\":\"Error updating metadata file, see log for details\",\r\n  \"log\":\"[o2rmeta] 20180316.085856 received arguments: {'debug': True, 'tool': 'validate', 'schema': 'schema/json/o2r-meta-schema.json', 'candidate': '/tmp/o2r/compendium/gTfIC/.erc/metadata_o2r_1.json'}\r\n[o2rmeta] 20180316.085856 launching validator\r\n[o2rmeta] 20180316.085856 checking metadata_o2r_1.json against o2r-meta-schema.json\r\n[o2rmeta] 20180316.085856 !invalid: None is not of type 'string'\r\n\r\nFailed validating 'type' in schema['properties']['depends']['items']['properties']['version']:\r\n    {'type': 'string'}\r\n\r\nOn instance['depends'][0]['version']:\r\n    None\"\r\n}\r\n```\r\n\r\nI assume this means that the property `depends` cannot be an empty array. However, the following JSON is saved just fine (based on R Markdown example workspace), and `depends` is also empty.\r\n\r\n```\r\n{  \r\n  \"o2r\":{  \r\n    \"upload_type\":\"publication\",\r\n    \"title\":\"Capacity of container ships in seaborne trade from 1980 to 2016 (in million dwt)*\",\r\n    \"temporal\":{  \r\n      \"end\":\"2017-03-16T00:00:00\",\r\n      \"begin\":\"2017-03-16T00:00:00\"\r\n    },\r\n    \"spatial\":{  },\r\n    \"publication_type\":\"other\",\r\n    \"publication_date\":\"2018-03-16T00:00:00.000Z\",\r\n    \"paperLanguage\":[  \r\n\r\n    ],\r\n    \"mainfile_candidates\":[  \r\n      \"main.Rmd\"\r\n    ],\r\n    \"mainfile\":\"main.Rmd\",\r\n    \"license\":{  },\r\n    \"keywords\":[  ],\r\n    \"interaction\":[  ],\r\n    \"inputfiles\":[  ],\r\n    \"identifier\":{  },\r\n    \"ercIdentifier\":\"sYeqH\",\r\n    \"displayfile_candidates\":[  ],\r\n    \"displayfile\":\"display.html\",\r\n    \"description\":\"Capacity of container ships in seaborne trade of the world container ship fleet.\\n\",\r\n    \"depends\":[  ],\r\n    \"creators\":[  ],\r\n    \"communities\":[  ],\r\n    \"codefiles\":[  \r\n      \"main.Rmd\"\r\n    ],\r\n    \"access_right\":\"open\"\r\n  }\r\n}\r\n```\r\n\r\n@7048730 Can you explain what happens here?"}}
{"actor":{"display_login":"nuest"}}