abc / api-problem
根据RFC 7807的API问题
0.1.1
2020-03-01 19:18 UTC
Requires
- doctrine/annotations: ^1.6
Requires (Dev)
- ext-json: *
- phpunit/phpunit: ^9.0
- symfony/debug: ^3.4|^4.0|^5.0
- symfony/http-foundation: ^3.4|^4.0|^5.0
- symfony/validator: ^3.4|^4.0|^5.0
- zircote/swagger-php: ^3.0
This package is not auto-updated.
Last update: 2024-09-23 18:18:16 UTC
README
一个PHP库,用于根据RFC 7870描述API问题。
安装
composer require abc/api-problem
使用
use Abc\ApiProblem; $apiProblem = new ApiProblem( 'http://domain.tld/problem/resource-not-found'), 'Resource Not Found', 404, sprintf('Resource with id "%s" not found', $id), $requestUri ); $json = $apiProblem->toJson();
许可证
MIT许可证(MIT)。更多信息请参阅许可证文件。