Skip to content

Commit

Permalink
Api documentation updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
michalstrzelecki committed Aug 19, 2016
1 parent a3f6b84 commit 3e2ec8a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 6 deletions.
22 changes: 21 additions & 1 deletion docs/api_data.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
define({ "api": [
{
"type": "delete",
"url": "/admin/blocks",
"url": "/admin/blocks/:id?force=:forceDelete",
"title": "6. DELETE the specified entity",
"version": "0.1.0",
"name": "DeleteBlock",
"group": "Block",
"parameter": {
"fields": {
"": [
{
"group": "Block",
"type": "Number",
"optional": false,
"field": "id",
"description": "<p>ID of the block.</p>"
},
{
"group": "Block",
"type": "Boolean",
"optional": false,
"field": "forceDelete",
"description": "<p>Idicates block should be permanently deleted or not.</p>"
}
]
}
},
"permission": [
{
"name": "admin",
Expand Down
22 changes: 21 additions & 1 deletion docs/api_data.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
[
{
"type": "delete",
"url": "/admin/blocks",
"url": "/admin/blocks/:id?force=:forceDelete",
"title": "6. DELETE the specified entity",
"version": "0.1.0",
"name": "DeleteBlock",
"group": "Block",
"parameter": {
"fields": {
"": [
{
"group": "Block",
"type": "Number",
"optional": false,
"field": "id",
"description": "<p>ID of the block.</p>"
},
{
"group": "Block",
"type": "Boolean",
"optional": false,
"field": "forceDelete",
"description": "<p>Idicates block should be permanently deleted or not.</p>"
}
]
}
},
"permission": [
{
"name": "admin",
Expand Down
2 changes: 1 addition & 1 deletion docs/api_project.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define({
"apidoc": "0.2.0",
"generator": {
"name": "apidoc",
"time": "2016-08-18T08:43:53.081Z",
"time": "2016-08-18T11:02:18.340Z",
"url": "http://apidocjs.com",
"version": "0.16.1"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/api_project.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"apidoc": "0.2.0",
"generator": {
"name": "apidoc",
"time": "2016-08-18T08:43:53.081Z",
"time": "2016-08-18T11:02:18.340Z",
"url": "http://apidocjs.com",
"version": "0.16.1"
}
Expand Down
6 changes: 4 additions & 2 deletions src/Gzero/Api/Controller/Admin/BlockController.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,18 @@ public function restore($id)
* curl -i http://api.example.com/api/v1/admin/blocks
*/
/**
* @api {delete} /admin/blocks 6. DELETE the specified entity
* @api {delete} /admin/blocks/:id?force=:forceDelete 6. DELETE the specified entity
* @apiVersion 0.1.0
* @apiName DeleteBlock
* @apiGroup Block
* @apiParam (Content) {Number} id ID of the block.
* @apiParam (Content) {Boolean} forceDelete Idicates block should be permanently deleted or not.
* @apiPermission admin
* @apiDescription Delete the specified block from database
* @apiSuccess {Boolean} success Success flag
*
* @apiExample Example usage:
* curl -i http://api.example.com/api/v1/admin/blocks
* curl -i http://api.example.com/api/v1/admin/blocks/21?force=true
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* {"success":true}
Expand Down

0 comments on commit 3e2ec8a

Please sign in to comment.