如何在Laravel 5.8中使用DarkaOnLine/L5 Swagger记录回调



我需要记录一个回调,我尝试过这样的方法,但它不起作用:

/**
* @OAPost(
*      path="/myurl-service",
*      operationId="Id",
*      tags={"Services"},
*      summary="Summary",
*      description="Desc",
*      security={
*           {"bearerAuth": {}}
*       },
*      @OARequestBody(
*          required=true,
*          @OAJsonContent(ref="#/components/schemas/Request")
*      ),
*      callbacks={
*          "Notification": {
*              "{$request.body#/notification_url}":
*              @OAPost(
*                  @OARequestBody(
*                      required=true
*                  ),
*                  @OAResponse(
*                      response=200,
*                      description="Successful operation"
*                  ),
*              ),
*          }
*      }
*     )
*/

有人记录过这件事吗?能帮我一把吗?

提前谢谢。

使用JSON表示法是有效的。示例:

*        callbacks={
*          "Notification"={
*              "{$requestBody.notification_url}"={
*                  "post"={
*                      "requestBody"={
*                          "required": true,
*                          "content": {
*                               "application/json": {
*                                   "schema": {
*                                       "$ref": "#/components/schemas/Schema"
*                                   }
*                               }
*                           }
*                      },
*                      "responses"={
*                          "200"={}
*                      }
*                  }
*              }
*          }

最新更新