lesname/documentor
最新稳定版本:0.7.0
Composer 安装命令:
composer require lesname/documentor
包简介
README 文档
README
Les Documentor is a library that helps read sources and transform it to type documents.
Current sources supported:
- ValueObjects
- OpenApi
Example
Value object
use LesDocumentor\Type\ClassPropertiesTypeDocumentor;
use LesValueObject\String\Format\EmailAddress;
$documentor = new ClassPropertiesTypeDocumentor();
$document = $documentor->document(EmailAddress::class);
Result:
StringTypeDocument
- reference: LesValueObject\String\Format\EmailAddress
- description: null
- nullable: false
- length
- minimal: 5
- maximal: 255
- format: null
- pattern: null
OpenApi
use LesDocumentor\Type\OpenApiTypeDocumentor;
$documentor = new OpenApiTypeDocumentor();
$document = $documentor->document(
[
"type" => "integer",
"minimum" => 100,
"maximum" => 600
],
);
Result:
NumberTypeDocument
- reference: null
- description: null
- nullable: false
- range
- minimal: 100
- maximal 500
- multipleOf: null
- format: null
统计信息
- 总下载量: 992
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-23