From 1166312c44592fc8193e88a7afa9812827271fd1 Mon Sep 17 00:00:00 2001 From: "Daniel G. Taylor" Date: Wed, 28 Oct 2015 17:13:07 -0700 Subject: [PATCH] Example blueprint updates for testing --- example.apib | 56 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/example.apib b/example.apib index 32f85277..2f2a408e 100644 --- a/example.apib +++ b/example.apib @@ -83,15 +83,33 @@ Get a list of notes. + Attributes (NoteList) ### Create New Note [POST] -Create a new note +Create a new note using a title and an optional content body. -+ Request (application/json) ++ Request with body (application/json) + Body { "title": "My new note", - "body": "..." + "body": "This is the body" + } + ++ Response 201 + ++ Response 400 (application/json) + + + Body + + { + "error": "Invalid title" + } + ++ Request without body (application/json) + + + Body + + { + "title": "My new note" } + Response 201 @@ -178,6 +196,36 @@ If the value for `title` or `body` is `null` or `undefined`, then the correspond "error": "Note not found" } ++ Request delete body (application/json) + + + Body + + { + "body": "" + } + ++ Response 200 (application/json) + + + Headers + + X-Request-ID: f72fc914 + X-Response-Time: 4ms + + + Attributes (NoteData) + ++ Response 404 (application/json) + + + Headers + + X-Request-ID: f72fc914 + X-Response-Time: 4ms + + + Body + + { + "error": "Note not found" + } + ### Delete a Note [DELETE] Delete a single note @@ -264,7 +312,7 @@ Get a list of bars Get a single tag + Parameters - + id + + id - Unique tag identifier ### GET