我正在使用darkaonline/l5-swagger: 7.0
生成基于OpenApi 3.0
的swagger UI。但是问题是required
验证仅适用于path
参数,而不适用于表单数据属性。我尝试在数组中添加所需的属性名称,但它仅以红色显示required
文本,但在执行时不进行验证。
/**
* @OA\Post(
* path="/sign-in",
* operationId="signIn",
* tags={"Authentication"},
* summary="AuthenticationController@signIn",
* description="Login",
* @OA\RequestBody(
* required=true,
* @OA\MediaType(mediaType="multipart/form-data",
* @OA\Schema(
* required={"email","password"},
* @OA\Property(
* property="email",
* type="string",
* description="Email"
* ),
* @OA\Property(
* property="password",
* type="string",
* description="Password"
* ),
* )
* )
* ),
* @OA\Response(
* response=200,
* description="Successful",
* ),
* @OA\Response(
* response=401,
* description="Unauthorized",
* ),
* )
*/