pra*_*y00 5 php json swagger swagger-ui
我想在POST的swagger文档中指定默认的json值.我收到T_CLOSE_PARENTHESIS错误.我也试过逃避".
/**
* @SWG\Api(path="/api/users",
* @SWG\Operation(
* method="POST",
* summary="Register a user",
* notes="Send a POST request along with required form parameters to add a new user",
* type="string",
* nickname="post-users",
* authorizations={},
* @SWG\Parameter(
* name="email",
* description="The email",
* required=true,
* type="json",
* paramType="body",
* allowMultiple=false,
* defaultValue = "{
"email":"pradeep****@gmail.com",
"first_name":"Pradeep",
"last_name":"Kumar",
"group":"subscriber",
"password":"password"
}",
* ),
*
* @SWG\ResponseMessage(code=200,message="Success"),
* @SWG\ResponseMessage(code=400,message="Bad Request")
* )
* )
*/
Run Code Online (Sandbox Code Playgroud)
Bob*_*ger 10
逃避"
教义/注释的使用""
defaultValue="{""email"":""p****@gmail.com"",""first_name"":""Pradeep""}"
Run Code Online (Sandbox Code Playgroud)