Rom*_*day 2 rest symfony nelmioapidocbundle
我的注释是:
* @OA\RequestBody(
* required=true,
* @OA\JsonContent(
* @OA\Schema (
* type="object",
* @OA\Property(property="status", required=true, description="EventStatus", type="string"),
* @OA\Property(property="comment", required=false, description="Change Status Comment", type="string"),
* example={
* "status": "test status",
* "comment": "test comment"
* }
* )
* )
* )
Run Code Online (Sandbox Code Playgroud)
我尝试添加一个“示例”键,但没有成功。

example@OA\JsonContentkey 必须是如下的一部分。
* @OA\RequestBody(
* required=true,
* @OA\JsonContent(
* example={
* "status": "status",
* "comment": "comment"
* },
* @OA\Schema (
* type="object",
* @OA\Property(property="status", required=true, description="Event Status", type="string"),
* @OA\Property(property="comment", required=false, description="Change Status Comment", type="string"),
* )
* )
* )
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2967 次 |
| 最近记录: |