У меня есть JSON, как показано ниже.Я пытаюсь создать версию чванства Laravel, но безуспешно.Я получил помощь от этого Как создать массив объектов в пост-запросе в Swagger с Laravel?
Это мой JSON, шаблон которого мне нужен в Laravel
{
"website_title": "http://apinew.testsite",
"settings": {
"website_footer_subtitle": "Copyright is copied",
"website_footer_description": null,
},
"website_logo_available": "https://s3.amazonaws.com/saas-dashboard/websiteData/1547811743mountains1.jpg",
"website_fav_icon_available": "https://s3.amazonaws.com/saas-dashboard/websiteData/1547811751SS Favicon @2x.png",
"templateSetId": "9",
"tenancyDatabase": "038e4744da294f2db8680a0a4016470b"
}
Я перепробовал много паттернов, но самый близкий из них такой:
/**
* @SWG\Post(
* path="/update-general-settings/{tenancyDatabase}/{general_settings}",
* description="Update the general settings for the website.",
* produces={"application/json"},
* consumes={"application/json"},
* tags={"Website"},
* security={
* {
* "Bearer": {},
*
* },
* },
* @SWG\Parameter(
* name="Update the settings of the website",
* in="body",
* description="",
* @SWG\Schema(
* type="array",
* @SWG\Items(
* type="object",
* @SWG\Property(type="string", property="website_title", description="user_name"),
* @SWG\Property(type="string", property="website_logo_available", description="website_logo_available"),
* @SWG\Property(type="string", property="website_fav_icon_available", description="website_fav_icon_available"),
* @SWG\Property(type="string", property="templateSetId", description="templateSetId"),
* @SWG\Property(type="string", property="tenancyDatabase", description="tenancyDatabase"),
* @SWG\Property(type="array", property="settings", description="settings",
* @SWG\Items(
* @SWG\Property(property="settings", type="object",
* type="array",
* @SWG\Items(
* @SWG\Property(property="website_desc", type="website_desc"),
* @SWG\Property(property="website_email", type="website_email"),
* ),
* ),
*
* ),
* ),
* ),
* ),
* ),
* ),
* @SWG\Response(
* response=200,
* description="OK",
* ),
* @SWG\Response(
* response=404,
* description="Not Found"
* ),
* @SWG\Response(
* response=401,
* description="unauthorized"
* )
* )
*/