我定义了我的模型架构,我想在数组属性中引用其中一个,并带有其他属性。如果我没有额外的属性,我当然可以这样做:
* @OA\Response(
* response=200,
* description="",
* @OA\JsonContent(
* @OA\Property(property="data", type="object", allOf={
* @OA\Schema(ref="#/components/schemas/Site"),
* @OA\Schema(
* @OA\Property(property="groups", type="array", @OA\Items(ref="#/components/schemas/Group")
* )
* })
* )
* ),
但是我想要做的是这样的:
* @OA\Response(
* response=200,
* description="",
* @OA\JsonContent(
* @OA\Property(property="data", type="object", allOf={
* @OA\Schema(ref="#/components/schemas/Site"),
* @OA\Schema(
* @OA\Property(property="groups", type="array", @OA\Items(
* @OA\Schema(ref="#/components/schemas/Group"),
* @OA\Property(property="additional_property", type="string")
* )
* )
* })
* )
* ),
这可能吗?