【发布时间】:2021-10-02 07:41:12
【问题描述】:
我的注释是:
* @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"
* }
* )
* )
* )
我尝试添加“示例”键,但没有成功。
【问题讨论】:
-
在您的屏幕截图中,我只看到“id”。也许这就是问题所在?
-
@StephanVierkant,可能是什么问题? 'id' - 是来自路径的参数。我将其描述为
@OA\Parameter(name="id", required=true, in="path", description="Event Id", @OA\Schema(type="integer", example=1)),顺便说一下,在这种情况下,“示例”键正在工作。
标签: rest symfony nelmioapidocbundle