{"action":"created","issue":{"url":"https://api.github.com/repos/keboola/storage-api-cli/issues/31","repository_url":"https://api.github.com/repos/keboola/storage-api-cli","labels_url":"https://api.github.com/repos/keboola/storage-api-cli/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/keboola/storage-api-cli/issues/31/comments","events_url":"https://api.github.com/repos/keboola/storage-api-cli/issues/31/events","html_url":"https://github.com/keboola/storage-api-cli/issues/31","id":298069950,"number":31,"title":"Empty configurations versioning","user":{"login":"Halama","id":903531,"avatar_url":"https://avatars3.githubusercontent.com/u/903531?v=4","gravatar_id":"","url":"https://api.github.com/users/Halama","html_url":"https://github.com/Halama","followers_url":"https://api.github.com/users/Halama/followers","following_url":"https://api.github.com/users/Halama/following{/other_user}","gists_url":"https://api.github.com/users/Halama/gists{/gist_id}","starred_url":"https://api.github.com/users/Halama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Halama/subscriptions","organizations_url":"https://api.github.com/users/Halama/orgs","repos_url":"https://api.github.com/users/Halama/repos","events_url":"https://api.github.com/users/Halama/events{/privacy}","received_events_url":"https://api.github.com/users/Halama/received_events","type":"User","site_admin":false},"labels":[{"id":39916974,"url":"https://api.github.com/repos/keboola/storage-api-cli/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-18T09:05:28Z","updated_at":"2018-02-18T09:08:48Z","closed_at":"2018-02-18T09:08:48Z","author_association":"OWNER","body":"### Jak nasimulovat\r\n\r\nZaložím prázdný config:\r\n```\r\ncurl -X POST -H \"x-storageApi-token:\" -F \"name=Accounts\" -F \"changeDescription=kokot\" -F \"description=Default CSV Importer\" \"https://connection.keboola.com/v2/storage/components/keboola.csv-import/configs\"\r\n```\r\nkterý po založení vypadá takhle:\r\n```\r\n{\r\n  \"version\": 1,\r\n  \"created\": \"2018-02-18T09:59:20+0100\",\r\n  \"creatorToken\": {\r\n    \"id\": 131132,\r\n    \"description\": \"martin.halamicek@keboola.com\"\r\n  },\r\n  \"changeDescription\": \"kokot\",\r\n  \"isDeleted\": false,\r\n  \"name\": \"Accounts\",\r\n  \"description\": \"Default CSV Importer\",\r\n  \"configuration\": {},\r\n  \"rowsSortOrder\": [],\r\n  \"rows\": []\r\n}\r\n```\r\n\r\nPokud ho updatnu s posláním prázdné verze je vše ok, a nová verze se neazaloží:\r\n```\r\ncurl -X PUT -H \"x-storageApi-token: \" -F \"name=Accounts\" -F \"changeDescription=kokot\" -F \"description=Default CSV Importer\" -F \"configuration=\" \"https://connection.keboola.com/v2/storage/components/keboola.csv-import/configs/357208480\"\r\n```\r\nConfig vypadá pořád stejně:\r\n```\r\n{\r\n  \"version\": 1,\r\n  \"created\": \"2018-02-18T09:59:20+0100\",\r\n  \"creatorToken\": {\r\n    \"id\": 131132,\r\n    \"description\": \"martin.halamicek@keboola.com\"\r\n  },\r\n  \"changeDescription\": \"kokot\",\r\n  \"isDeleted\": false,\r\n  \"name\": \"Accounts\",\r\n  \"description\": \"Default CSV Importer\",\r\n  \"configuration\": {},\r\n  \"rowsSortOrder\": [],\r\n  \"rows\": []\r\n}\r\n```\r\n\r\nPokud ale pošlu konfigurace jako prázdný objekt verze se změní, navenek ale vypadá uplně stejně jako předchozí\r\n\r\n```\r\ncurl -X PUT -H \"x-storageApi-token: \"  -F \"name=Accounts\" -F \"changeDescription=kokot\" -F \"description=Default CSV Importer\" -F \"configuration={}\" \"https://connection.keboola.com/v2/storage/components/keboola.csv-import/configs/357208480\"\r\n```\r\n\r\nJe založena nová verze ale config vypadá pořád stejně:\r\n```\r\n{\r\n  \"version\": 2,\r\n  \"created\": \"2018-02-18T10:00:28+0100\",\r\n  \"creatorToken\": {\r\n    \"id\": 131132,\r\n    \"description\": \"martin.halamicek@keboola.com\"\r\n  },\r\n  \"changeDescription\": \"kokot\",\r\n  \"isDeleted\": false,\r\n  \"name\": \"Accounts\",\r\n  \"description\": \"Default CSV Importer\",\r\n  \"configuration\": {},\r\n  \"rowsSortOrder\": [],\r\n  \"rows\": []\r\n}\r\n```\r\n\r\nDokonce projde i uložení configu jako pole což by nemělo být povolené!\r\n```\r\ncurl -X PUT -H \"x-storageApi-token:\" -H \"Cache-Control: no-cache\" -F \"name=Accounts\" -F \"changeDescription=kokot\" -F \"description=Default CSV Importer\" -F \"configuration=[]\" \"https://connection.keboola.com/v2/storage/components/keboola.csv-import/configs/357208480\"\r\n```\r\n\r\nConfig pak vypadá takhle:\r\n```\r\n{\r\n  \"version\": 3,\r\n  \"created\": \"2018-02-18T10:06:13+0100\",\r\n  \"creatorToken\": {\r\n    \"id\": 131132,\r\n    \"description\": \"martin.halamicek@keboola.com\"\r\n  },\r\n  \"changeDescription\": \"kokot\",\r\n  \"isDeleted\": false,\r\n  \"name\": \"Accounts\",\r\n  \"description\": \"Default CSV Importer\",\r\n  \"configuration\": [],\r\n  \"rowsSortOrder\": [],\r\n  \"rows\": []\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/keboola/storage-api-cli/issues/comments/366502164","html_url":"https://github.com/keboola/storage-api-cli/issues/31#issuecomment-366502164","issue_url":"https://api.github.com/repos/keboola/storage-api-cli/issues/31","id":366502164,"user":{"login":"Halama","id":903531,"avatar_url":"https://avatars3.githubusercontent.com/u/903531?v=4","gravatar_id":"","url":"https://api.github.com/users/Halama","html_url":"https://github.com/Halama","followers_url":"https://api.github.com/users/Halama/followers","following_url":"https://api.github.com/users/Halama/following{/other_user}","gists_url":"https://api.github.com/users/Halama/gists{/gist_id}","starred_url":"https://api.github.com/users/Halama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Halama/subscriptions","organizations_url":"https://api.github.com/users/Halama/orgs","repos_url":"https://api.github.com/users/Halama/repos","events_url":"https://api.github.com/users/Halama/events{/privacy}","received_events_url":"https://api.github.com/users/Halama/received_events","type":"User","site_admin":false},"created_at":"2018-02-18T09:08:48Z","updated_at":"2018-02-18T09:08:48Z","author_association":"OWNER","body":"špatný repo https://github.com/keboola/connection/issues/1209"}}
{"actor":{"display_login":"Halama"}}