{"action":"created","issue":{"url":"https://api.github.com/repos/zalando/nakadi/issues/513","repository_url":"https://api.github.com/repos/zalando/nakadi","labels_url":"https://api.github.com/repos/zalando/nakadi/issues/513/labels{/name}","comments_url":"https://api.github.com/repos/zalando/nakadi/issues/513/comments","events_url":"https://api.github.com/repos/zalando/nakadi/issues/513/events","html_url":"https://github.com/zalando/nakadi/issues/513","id":195550546,"number":513,"title":"Validation error when publishing a valid event-type","user":{"login":"kanuku","id":4045639,"avatar_url":"https://avatars.githubusercontent.com/u/4045639?v=3","gravatar_id":"","url":"https://api.github.com/users/kanuku","html_url":"https://github.com/kanuku","followers_url":"https://api.github.com/users/kanuku/followers","following_url":"https://api.github.com/users/kanuku/following{/other_user}","gists_url":"https://api.github.com/users/kanuku/gists{/gist_id}","starred_url":"https://api.github.com/users/kanuku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanuku/subscriptions","organizations_url":"https://api.github.com/users/kanuku/orgs","repos_url":"https://api.github.com/users/kanuku/repos","events_url":"https://api.github.com/users/kanuku/events{/privacy}","received_events_url":"https://api.github.com/users/kanuku/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-14T14:50:14Z","updated_at":"2016-12-18T11:42:49Z","closed_at":null,"body":"When publishing an event, nakadi returns a validation error. The event seems valid, this might be a bug in the validation lib you're using.\r\n**environment:** `staging`\r\n**event-type ends with:** `test-process-chain-logistics-clients_process_status_changed`\r\n\r\nThe schema:\r\n\r\n```json\r\n{\r\n  \"type\":\"object\",\r\n  \"properties\": {\r\n    \"process_instance\": {\r\n      \"type\": \"string\"\r\n    },\r\n    \"subject\": {\r\n      \"type\": \"string\"\r\n    },\r\n    \"status\": {\r\n      \"type\": \"string\"\r\n    },\r\n    \"subject_meta_data\": {\r\n      \"type\": \"object\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nThe event we try to publish:\r\n```json\r\n[\r\n  {\r\n    \"metadata\": {\r\n      \"eid\": \"422ad7c5-93d6-4093-9a9d-327cd8f9b362\",\r\n      \"occurred_at\": \"2016-12-14T12:10:31Z\"\r\n    },\r\n    \"process_instance\": \"/test-process-chain-logistics-clients/4f3381b0-c1f6-11e6-bcd7-43aa39b531de\",\r\n    \"subject\": \"/test-process-chain-logistics-clients/4f3381b0-c1f6-11e6-bcd7-43aa39b531de\",\r\n    \"status\": \"/processes/status/process-chain-in-preparation\",\r\n    \"subject_meta_data\": {\r\n      \"is_root\": \"true\"\r\n    }\r\n  }\r\n]\r\n```\r\n\r\nThe error:\r\n```json\r\n[\r\n  {\r\n    \"publishing_status\": \"failed\",\r\n    \"detail\": \"#/subject_meta_data: extraneous key [is_root] is not permitted\",\r\n    \"step\": \"validating\",\r\n    \"eid\": \"422ad7c5-93d6-4093-9a9d-327cd8f9b362\"\r\n  }\r\n]\r\n```"},"comment":{"url":"https://api.github.com/repos/zalando/nakadi/issues/comments/267816668","html_url":"https://github.com/zalando/nakadi/issues/513#issuecomment-267816668","issue_url":"https://api.github.com/repos/zalando/nakadi/issues/513","id":267816668,"user":{"login":"valgog","id":448014,"avatar_url":"https://avatars.githubusercontent.com/u/448014?v=3","gravatar_id":"","url":"https://api.github.com/users/valgog","html_url":"https://github.com/valgog","followers_url":"https://api.github.com/users/valgog/followers","following_url":"https://api.github.com/users/valgog/following{/other_user}","gists_url":"https://api.github.com/users/valgog/gists{/gist_id}","starred_url":"https://api.github.com/users/valgog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valgog/subscriptions","organizations_url":"https://api.github.com/users/valgog/orgs","repos_url":"https://api.github.com/users/valgog/repos","events_url":"https://api.github.com/users/valgog/events{/privacy}","received_events_url":"https://api.github.com/users/valgog/received_events","type":"User","site_admin":false},"created_at":"2016-12-18T11:42:49Z","updated_at":"2016-12-18T11:42:49Z","body":"@kanuku I could not understand your request :(\r\n\r\nDo you mean that `\"type\": \"object\"` is allowed?\r\n\r\nI think the biggest complexity here is, that `additionalProperties` are defaulted to `true` for classical json-schema, and Nakadi in compatibility mode default it to `false`. \r\n\r\nIn the example above, `subject_meta_data` field will be allowed by Nakadi, but the only value that it would be able to get, would be an empty object `{}` or `null`.\r\n\r\n"}}
{"actor":{"display_login":"valgog"}}