小编Rom*_*day的帖子

如何在 NelmioApiDoc Bundle 中添加 RequestBody 示例?

我的注释是:

     * @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)

我尝试添加一个“示例”键,但没有成功。

https://i.stack.imgur.com/of5pj.png

rest symfony nelmioapidocbundle

2
推荐指数
1
解决办法
2967
查看次数

标签 统计

nelmioapidocbundle ×1

rest ×1

symfony ×1