{"action":"created","comment":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/107687806","pull_request_review_id":28674369,"id":107687806,"diff_hunk":"@@ -85,6 +93,196 @@ public function it_allows_showing_product_attribute()\n     }\n \n     /**\n+     * @test\n+     */\n+    public function it_does_not_allow_to_delete_product_attribute_if_it_does_not_exist()\n+    {\n+        $this->loadFixturesFromFile('authentication/api_administrator.yml');\n+\n+        $this->client->request('DELETE', '/api/v1/product-attributes/-1', [], [], static::$authorizedHeaderWithContentType);\n+\n+        $response = $this->client->getResponse();\n+        $this->assertResponse($response, 'error/not_found_response', Response::HTTP_NOT_FOUND);\n+    }\n+\n+    /**\n+     * @test\n+     */\n+    public function it_allows_delete_to_product_attribute()\n+    {\n+        $this->loadFixturesFromFile('authentication/api_administrator.yml');\n+        $productAttributes = $this->loadFixturesFromFile('resources/product_attributes.yml');\n+        $productAttribute = $productAttributes['productAttribute1'];\n+\n+        $this->client->request('DELETE', $this->getProductAttributeUrl($productAttribute), [], [], static::$authorizedHeaderWithContentType);\n+\n+        $response = $this->client->getResponse();\n+        $this->assertResponseCode($response, Response::HTTP_NO_CONTENT);\n+\n+        $this->client->request('GET', '/api/v1/product-attributes/', [], [], static::$authorizedHeaderWithAccept);\n+\n+        $response = $this->client->getResponse();\n+        $this->assertResponse($response, 'product_attribute/index_response_after_delete', Response::HTTP_OK);\n+    }\n+\n+    /**\n+     * @test\n+     */\n+    public function it_allows_to_create_product_attribute()\n+    {\n+        $this->loadFixturesFromFile('authentication/api_administrator.yml');\n+        $this->loadFixturesFromFile('resources/locales.yml');\n+\n+        $data = <<<EOT\n+{\n+    \"code\": \"mug_material\",\n+    \"type\": \"text\",\n+    \"translations\": {\n+        \"de_CH\": {\n+            \"name\": \"Becher Material\"\n+        },\n+        \"en_US\": {\n+            \"name\": \"Mug material\"\n+        }\n+    }\n+}\n+EOT;\n+\n+        $this->client->request('POST', '/api/v1/product-attributes', [], [], static::$authorizedHeaderWithContentType, $data);","path":"tests/Controller/ProductAttributeApiTest.php","position":74,"original_position":74,"commit_id":"a1837885f78518ffe023a841e2335619767e3258","original_commit_id":"a1837885f78518ffe023a841e2335619767e3258","user":{"login":"alcaeus","id":383198,"avatar_url":"https://avatars1.githubusercontent.com/u/383198?v=3","gravatar_id":"","url":"https://api.github.com/users/alcaeus","html_url":"https://github.com/alcaeus","followers_url":"https://api.github.com/users/alcaeus/followers","following_url":"https://api.github.com/users/alcaeus/following{/other_user}","gists_url":"https://api.github.com/users/alcaeus/gists{/gist_id}","starred_url":"https://api.github.com/users/alcaeus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alcaeus/subscriptions","organizations_url":"https://api.github.com/users/alcaeus/orgs","repos_url":"https://api.github.com/users/alcaeus/repos","events_url":"https://api.github.com/users/alcaeus/events{/privacy}","received_events_url":"https://api.github.com/users/alcaeus/received_events","type":"User","site_admin":false},"body":"The create route for product options has a trailing slash - what would you prefer? With or without a trailing slash?","created_at":"2017-03-23T14:47:57Z","updated_at":"2017-03-23T14:47:57Z","html_url":"https://github.com/Sylius/Sylius/pull/7816#discussion_r107687806","pull_request_url":"https://api.github.com/repos/Sylius/Sylius/pulls/7816","_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/107687806"},"html":{"href":"https://github.com/Sylius/Sylius/pull/7816#discussion_r107687806"},"pull_request":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/7816"}}},"pull_request":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/7816","id":112241983,"html_url":"https://github.com/Sylius/Sylius/pull/7816","diff_url":"https://github.com/Sylius/Sylius/pull/7816.diff","patch_url":"https://github.com/Sylius/Sylius/pull/7816.patch","issue_url":"https://api.github.com/repos/Sylius/Sylius/issues/7816","number":7816,"state":"open","locked":false,"title":"Allow writing product attributes via API","user":{"login":"alcaeus","id":383198,"avatar_url":"https://avatars1.githubusercontent.com/u/383198?v=3","gravatar_id":"","url":"https://api.github.com/users/alcaeus","html_url":"https://github.com/alcaeus","followers_url":"https://api.github.com/users/alcaeus/followers","following_url":"https://api.github.com/users/alcaeus/following{/other_user}","gists_url":"https://api.github.com/users/alcaeus/gists{/gist_id}","starred_url":"https://api.github.com/users/alcaeus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alcaeus/subscriptions","organizations_url":"https://api.github.com/users/alcaeus/orgs","repos_url":"https://api.github.com/users/alcaeus/repos","events_url":"https://api.github.com/users/alcaeus/events{/privacy}","received_events_url":"https://api.github.com/users/alcaeus/received_events","type":"User","site_admin":false},"body":"| Q               | A\r\n| --------------- | ---\r\n| Bug fix?        | no |\r\n| New feature?    | yes |\r\n| BC breaks?      | no |\r\n| Related tickets | related to #7811  |\r\n| License         | MIT |\r\n\r\nSimilar to #7811, but for product attributes.","created_at":"2017-03-23T13:50:35Z","updated_at":"2017-03-23T14:47:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f52ee998a845e54447d5eea646016dd1b46a3d8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Sylius/Sylius/pulls/7816/commits","review_comments_url":"https://api.github.com/repos/Sylius/Sylius/pulls/7816/comments","review_comment_url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sylius/Sylius/issues/7816/comments","statuses_url":"https://api.github.com/repos/Sylius/Sylius/statuses/a1837885f78518ffe023a841e2335619767e3258","head":{"label":"alcaeus:modify-product-attribute-api","ref":"modify-product-attribute-api","sha":"a1837885f78518ffe023a841e2335619767e3258","user":{"login":"alcaeus","id":383198,"avatar_url":"https://avatars1.githubusercontent.com/u/383198?v=3","gravatar_id":"","url":"https://api.github.com/users/alcaeus","html_url":"https://github.com/alcaeus","followers_url":"https://api.github.com/users/alcaeus/followers","following_url":"https://api.github.com/users/alcaeus/following{/other_user}","gists_url":"https://api.github.com/users/alcaeus/gists{/gist_id}","starred_url":"https://api.github.com/users/alcaeus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alcaeus/subscriptions","organizations_url":"https://api.github.com/users/alcaeus/orgs","repos_url":"https://api.github.com/users/alcaeus/repos","events_url":"https://api.github.com/users/alcaeus/events{/privacy}","received_events_url":"https://api.github.com/users/alcaeus/received_events","type":"User","site_admin":false},"repo":{"id":82264654,"name":"Sylius","full_name":"alcaeus/Sylius","owner":{"login":"alcaeus","id":383198,"avatar_url":"https://avatars1.githubusercontent.com/u/383198?v=3","gravatar_id":"","url":"https://api.github.com/users/alcaeus","html_url":"https://github.com/alcaeus","followers_url":"https://api.github.com/users/alcaeus/followers","following_url":"https://api.github.com/users/alcaeus/following{/other_user}","gists_url":"https://api.github.com/users/alcaeus/gists{/gist_id}","starred_url":"https://api.github.com/users/alcaeus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alcaeus/subscriptions","organizations_url":"https://api.github.com/users/alcaeus/orgs","repos_url":"https://api.github.com/users/alcaeus/repos","events_url":"https://api.github.com/users/alcaeus/events{/privacy}","received_events_url":"https://api.github.com/users/alcaeus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alcaeus/Sylius","description":"eCommerce PHP framework built on top of Symfony with component-based architecture and format-agnostic rendering. (HTML/JSON/XML)","fork":true,"url":"https://api.github.com/repos/alcaeus/Sylius","forks_url":"https://api.github.com/repos/alcaeus/Sylius/forks","keys_url":"https://api.github.com/repos/alcaeus/Sylius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alcaeus/Sylius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alcaeus/Sylius/teams","hooks_url":"https://api.github.com/repos/alcaeus/Sylius/hooks","issue_events_url":"https://api.github.com/repos/alcaeus/Sylius/issues/events{/number}","events_url":"https://api.github.com/repos/alcaeus/Sylius/events","assignees_url":"https://api.github.com/repos/alcaeus/Sylius/assignees{/user}","branches_url":"https://api.github.com/repos/alcaeus/Sylius/branches{/branch}","tags_url":"https://api.github.com/repos/alcaeus/Sylius/tags","blobs_url":"https://api.github.com/repos/alcaeus/Sylius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alcaeus/Sylius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alcaeus/Sylius/git/refs{/sha}","trees_url":"https://api.github.com/repos/alcaeus/Sylius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alcaeus/Sylius/statuses/{sha}","languages_url":"https://api.github.com/repos/alcaeus/Sylius/languages","stargazers_url":"https://api.github.com/repos/alcaeus/Sylius/stargazers","contributors_url":"https://api.github.com/repos/alcaeus/Sylius/contributors","subscribers_url":"https://api.github.com/repos/alcaeus/Sylius/subscribers","subscription_url":"https://api.github.com/repos/alcaeus/Sylius/subscription","commits_url":"https://api.github.com/repos/alcaeus/Sylius/commits{/sha}","git_commits_url":"https://api.github.com/repos/alcaeus/Sylius/git/commits{/sha}","comments_url":"https://api.github.com/repos/alcaeus/Sylius/comments{/number}","issue_comment_url":"https://api.github.com/repos/alcaeus/Sylius/issues/comments{/number}","contents_url":"https://api.github.com/repos/alcaeus/Sylius/contents/{+path}","compare_url":"https://api.github.com/repos/alcaeus/Sylius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alcaeus/Sylius/merges","archive_url":"https://api.github.com/repos/alcaeus/Sylius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alcaeus/Sylius/downloads","issues_url":"https://api.github.com/repos/alcaeus/Sylius/issues{/number}","pulls_url":"https://api.github.com/repos/alcaeus/Sylius/pulls{/number}","milestones_url":"https://api.github.com/repos/alcaeus/Sylius/milestones{/number}","notifications_url":"https://api.github.com/repos/alcaeus/Sylius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alcaeus/Sylius/labels{/name}","releases_url":"https://api.github.com/repos/alcaeus/Sylius/releases{/id}","deployments_url":"https://api.github.com/repos/alcaeus/Sylius/deployments","created_at":"2017-02-17T06:25:10Z","updated_at":"2017-02-17T06:25:21Z","pushed_at":"2017-03-23T13:49:47Z","git_url":"git://github.com/alcaeus/Sylius.git","ssh_url":"git@github.com:alcaeus/Sylius.git","clone_url":"https://github.com/alcaeus/Sylius.git","svn_url":"https://github.com/alcaeus/Sylius","homepage":"http://Sylius.org","size":58248,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Sylius:master","ref":"master","sha":"0d15f5056730b6cd16e7257a8a847ec0c8f82584","user":{"login":"Sylius","id":719423,"avatar_url":"https://avatars1.githubusercontent.com/u/719423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"repo":{"id":2717549,"name":"Sylius","full_name":"Sylius/Sylius","owner":{"login":"Sylius","id":719423,"avatar_url":"https://avatars1.githubusercontent.com/u/719423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sylius/Sylius","description":"eCommerce PHP framework built on top of Symfony with component-based architecture and format-agnostic rendering. (HTML/JSON/XML)","fork":false,"url":"https://api.github.com/repos/Sylius/Sylius","forks_url":"https://api.github.com/repos/Sylius/Sylius/forks","keys_url":"https://api.github.com/repos/Sylius/Sylius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sylius/Sylius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sylius/Sylius/teams","hooks_url":"https://api.github.com/repos/Sylius/Sylius/hooks","issue_events_url":"https://api.github.com/repos/Sylius/Sylius/issues/events{/number}","events_url":"https://api.github.com/repos/Sylius/Sylius/events","assignees_url":"https://api.github.com/repos/Sylius/Sylius/assignees{/user}","branches_url":"https://api.github.com/repos/Sylius/Sylius/branches{/branch}","tags_url":"https://api.github.com/repos/Sylius/Sylius/tags","blobs_url":"https://api.github.com/repos/Sylius/Sylius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sylius/Sylius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sylius/Sylius/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sylius/Sylius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sylius/Sylius/statuses/{sha}","languages_url":"https://api.github.com/repos/Sylius/Sylius/languages","stargazers_url":"https://api.github.com/repos/Sylius/Sylius/stargazers","contributors_url":"https://api.github.com/repos/Sylius/Sylius/contributors","subscribers_url":"https://api.github.com/repos/Sylius/Sylius/subscribers","subscription_url":"https://api.github.com/repos/Sylius/Sylius/subscription","commits_url":"https://api.github.com/repos/Sylius/Sylius/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sylius/Sylius/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sylius/Sylius/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sylius/Sylius/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sylius/Sylius/contents/{+path}","compare_url":"https://api.github.com/repos/Sylius/Sylius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sylius/Sylius/merges","archive_url":"https://api.github.com/repos/Sylius/Sylius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sylius/Sylius/downloads","issues_url":"https://api.github.com/repos/Sylius/Sylius/issues{/number}","pulls_url":"https://api.github.com/repos/Sylius/Sylius/pulls{/number}","milestones_url":"https://api.github.com/repos/Sylius/Sylius/milestones{/number}","notifications_url":"https://api.github.com/repos/Sylius/Sylius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sylius/Sylius/labels{/name}","releases_url":"https://api.github.com/repos/Sylius/Sylius/releases{/id}","deployments_url":"https://api.github.com/repos/Sylius/Sylius/deployments","created_at":"2011-11-05T22:05:52Z","updated_at":"2017-03-23T11:40:28Z","pushed_at":"2017-03-23T13:50:36Z","git_url":"git://github.com/Sylius/Sylius.git","ssh_url":"git@github.com:Sylius/Sylius.git","clone_url":"https://github.com/Sylius/Sylius.git","svn_url":"https://github.com/Sylius/Sylius","homepage":"http://Sylius.org","size":58246,"stargazers_count":2896,"watchers_count":2896,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1062,"mirror_url":null,"open_issues_count":464,"forks":1062,"open_issues":464,"watchers":2896,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/7816"},"html":{"href":"https://github.com/Sylius/Sylius/pull/7816"},"issue":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/7816"},"comments":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/7816/comments"},"review_comments":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/7816/comments"},"review_comment":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/7816/commits"},"statuses":{"href":"https://api.github.com/repos/Sylius/Sylius/statuses/a1837885f78518ffe023a841e2335619767e3258"}}}}
{"actor":{"display_login":"alcaeus"}}