Used boolean to set the parameter

This commit is contained in:
William DURAND 2012-04-12 20:00:26 +02:00
parent 9eab1452c5
commit 20fd6b753a
2 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ class ApiDoc
$this->description = $data['description'];
}
$this->isResource = isset($data['resource']);
$this->isResource = isset($data['resource']) && $data['resource'];
}
/**

View File

@ -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;