I am using darkaonline/l5-swagger: 7.0
for generate swagger UI which based on OpenApi 3.0
. But the problem is required
validation only works for path
params and not with form-data properties. I tried adding required property names in an array but it only shows required
text in red color but not validates when execute.
/**
* @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",
* ),
* )
*/