这样就可以了。可能不会像这样,而是做我想做的事。
/**
* @package
* @category
* @subpackage
*
* @SWG\Resource(
* apiVersion="1.0.0",
* swaggerVersion="1.2",
* basePath="http://myapi",
* resourcePath="/hello",
* description="Giving you your name in case you forgot it",
* produces="['application/json','application/xml','text/plain','text/html']"
* )
*/
/**
* @SWG\Api(
* path="/hello/{yourname}",
* @SWG\Operation(
* method="GET",
* summary="Gives you your name",
* notes="Returns your name",
* type="hello",
* nickname="yourname",
* @SWG\Parameter(
* name="yourname",
* description="Enter your name",
* required=true,
* type="text",
* paramType="path"
* ),
* @SWG\ResponseMessage(code=404, message="Bad, really bad name.")
* )
* )
*
*/
/**
* @package
* @category
* @subpackage
*
* @SWG\Model(id="hello",required="name")
*/
/**
* @SWG\Property(name="name",type="string",description="Your name")
*/