diff --git a/apiary.apib b/apiary.apib index 51ec4a2..a738412 100644 --- a/apiary.apib +++ b/apiary.apib @@ -663,7 +663,7 @@ Ein Post Objekt hat die folgenden Attribute + data (object) + type: `comments` (string) + attributes (object) - + `content`: ` ` (string) - Der Comment-Inhalt + + `content`: (string) - Der Comment-Inhalt + Response 400 (application/vnd.api+json) diff --git a/errors.apib b/errors.apib index f9cf99d..4ec1bbb 100644 --- a/errors.apib +++ b/errors.apib @@ -287,7 +287,7 @@ Hier werden Fehler und Fehlermeldungen der API getestet. + type: `posts` (string) + attributes (object) + `title`: `The post title` (string) - Der Title, kann auch leer sein - + `content`: `` (string) - Der Post-Inhalt + + `content`: (string) - Der Post-Inhalt + `view_allowed_for`: `users` (string) - Wer kann diesen Post sehen? (`all`, `users`, `friends` oder `authors`) + `comments_allowed`: true (boolean) - Kann dieser Post kommentiert werden? @@ -369,7 +369,7 @@ Hier werden Fehler und Fehlermeldungen der API getestet. + Attributes (Forbidden Error) -## Create Comment with content errors [/posts/d5a5a2c3-041b-4985-907c-74a2131efc98/comments] +## Create Comment with content errors [/posts/25a5a2c3-041b-4985-907c-74a2131efc98/comments] ### Create a comment with empty content [POST] + Request (application/vnd.api+json) @@ -383,7 +383,7 @@ Hier werden Fehler und Fehlermeldungen der API getestet. + data (object) + type: `comments` (string) + attributes (object) - + `content`: `` (string) - Der Comment-Inhalt + + `content`: (string) - Der Comment-Inhalt + Response 400 (application/vnd.api+json) diff --git a/features/core/objects_comments.feature b/features/core/objects_comments.feature index 2665f34..333b3cd 100644 --- a/features/core/objects_comments.feature +++ b/features/core/objects_comments.feature @@ -132,7 +132,7 @@ Scenario: Create a comment with empty content """ {"data":{"type":"comments","attributes":{"content":""}}} """ - When I request "POST /posts/d5a5a2c3-041b-4985-907c-74a2131efc98/comments" + When I request "POST /posts/25a5a2c3-041b-4985-907c-74a2131efc98/comments" Then I get a "400" response And the correct headers are set And the "errors" property exists @@ -151,7 +151,7 @@ Scenario: Create a comment with missing content """ {"data":{"type":"comments","attributes":{}}} """ - When I request "POST /posts/d5a5a2c3-041b-4985-907c-74a2131efc98/comments" + When I request "POST /posts/25a5a2c3-041b-4985-907c-74a2131efc98/comments" Then I get a "400" response And the correct headers are set And the "errors" property exists