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;