Slide 27
Slide 27 text
Copyright © M&A Cloud All rights reserved.
同じスキーマは共通化する
* @OA\Schema(
* schema="recipe_object",
* type="object",
* @OA\Property(
* property="id",
* type="string",
* description="レシピID",
* ),
* @OA\Property(
* property="title",
* type="string",
* description="レシピ名",
* ),
* @OA\Property(
* property="description",
* type="string",
* description="レシピ内容",
* )
* )
*/ 27
例1)レスポンスのオブジェクト
/src/Controller/Api/swagger.php
/ **
* @OA\Response(
* type="object",
* @OA\JsonContent(
ref="#/components/schemas/recipe_object")
* ),
* ),
src/Controller/Api/RecipeController.php