在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:atymic/json2dto开源软件地址:https://github.com/atymic/json2dto开源编程语言:PHP 51.4%开源软件介绍:Json 2 DTOSpatie's Data Transfer Object library is awesome, but typing out DTOs can quickly become a chore. Inspired by Json2Typescript style tools, we built one for PHP DTOs. Web VersionTry it out at https://json2dto.atymic.dev CLI ToolPrefer to use the tool locally? You can install composer global require atymic/json2dto # Install Globally
composer require atymic/json2dto --dev # Install locally in a project UsageThe tool accepts json input either as a filename (second argument) or via Examples# Generate PHP 7.4 typed DTO
./vendor/bin/json2dto generate "App\DTO" test.json -name "Test" --typed
# Generate PHP 8.0 typed DTO (DTO V3)
./vendor/bin/json2dto generate "App\DTO" test.json -name "Test" --v3
# Generate a flexible DTO (with nested DTOs)
./vendor/bin/json2dto generate "App\DTO" test.json -name "Test" --nested --flexible
# Generate a DTO from stdin
wget http://example.com/cat.json | ./vendor/bin/json2dto generate "App\DTO" -name Cat Usage
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论