-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
ApiModelProperty没有format且simpleType也没有file类型
话说能不能结合一下让swagger+hyperf验证器合并一体化。
api构造器+swagger响应也一体化。还是说目前大佬这个已经能一体化了,是我姿势不对?
<?php
declare(strict_types=1);
/**
* 由233cy作者开发的nbplus项目,用于企业级开发中台框架。
*
* @link https://blog.233cy.com:522
* @document https://docnbplus.233cy.com:522
* @contact wfuren@qq.com
*/
namespace App\Http\Common\Dto\Request\Upload;
use Hyperf\ApiDocs\Annotation\ApiModelProperty;
use Hyperf\DTO\Annotation\Validation\Integer;
use Hyperf\DTO\Annotation\Validation\Required;
use Hyperf\HttpMessage\Upload\UploadedFile;
class NormalFileValid
{
#[ApiModelProperty('文件二进制流', '', false, true)]
#[Required()]
public UploadedFile $file;
#[ApiModelProperty('是否为私有,2为公开其余为私有', 2, false, true)]
#[Required()]
#[Integer()]
public int $isPrivate = 2;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels