From 20fd6b753acf09eec604285ee881c4885ea4acc9 Mon Sep 17 00:00:00 2001 From: William DURAND Date: Thu, 12 Apr 2012 20:00:26 +0200 Subject: [PATCH] Used boolean to set the parameter --- Annotation/ApiDoc.php | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Annotation/ApiDoc.php b/Annotation/ApiDoc.php index 2176332..c273906 100644 --- a/Annotation/ApiDoc.php +++ b/Annotation/ApiDoc.php @@ -48,7 +48,7 @@ class ApiDoc $this->description = $data['description']; } - $this->isResource = isset($data['resource']); + $this->isResource = isset($data['resource']) && $data['resource']; } /** diff --git a/README.md b/README.md index be44269..7da4b52 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ class YourController extends Controller { /** * @ApiDoc( - * resource="true", + * resource=true, * description="This is a description of your API method", * filters={ * {"name"="a-filter", "dataType"="integer"}, @@ -82,7 +82,7 @@ class YourController extends Controller The following parameters are recognized: -* `resource`: whether the method describes a resource or not; +* `resource`: whether the method describes a resource or not (default: `false`); * `description`: a description of the API method;