描述如何在swagger yii2中获得特定用户?
我有一个方法(show),可以用来获取特定用户的信息。如何在swagher链接(localhost/users/12)中描述它描述如何在swagger yii2中获得特定用户?,yii2,swagger,Yii2,Swagger,我有一个方法(show),可以用来获取特定用户的信息。如何在swagher链接(localhost/users/12)中描述它 /** * @SWG\Get(path="/api/users/id", * tags={"User"}, * summary="", * @SWG\Parameter( * name="Authorization", * in="header",
/**
* @SWG\Get(path="/api/users/id",
* tags={"User"},
* summary="",
* @SWG\Parameter(
* name="Authorization",
* in="header",
* description="",
* required=true,
* type="string"
* ),
* @SWG\Response(
* response = 200,
* description = "Ok",
* @SWG\Schema(ref = "#/")
* ),
* @SWG\Response(
* response = 400,
* description = "Bad Request",
* @SWG\Schema(ref = "#/")
* ),
* @SWG\Response(
* response = 404,
* description = "Not Found",
* @SWG\Schema(ref = "#/")
* ),
* @SWG\Response(
* response = 500,
* description = "Internal Server Error"
* )
* )
*/
/**
* @SWG\Get(path="/api/users/{id}",
* tags={"User"},
* summary="",
* @SWG\Parameter(
* name="Authorization",
* in="header",
* description="",
* required=true,
* type="string"
* ),
* @SWG\Parameter(
* name="id",
* in="path",
* description="Укажите ID",
* required=true,
* type="string"
* ),
* @SWG\Response(
* response = 200,
* description = "Ok",
* @SWG\Schema(ref = "#/")
* ),
* @SWG\Response(
* response = 400,
* description = "Bad Request",
* @SWG\Schema(ref = "#/")
* ),
* @SWG\Response(
* response = 404,
* description = "Not Found",
* @SWG\Schema(ref = "#/")
* ),
* @SWG\Response(
* response = 500,
* description = "Internal Server Error"
* )
* )
*/