webcoder01 / json-api
A framework-agnostic library designed to use HTTP requests with ease in accordance with the JSON:API specification.
Installs: 47
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/webcoder01/json-api
Requires
- php: >=8.1
Requires (Dev)
- brainmaestro/composer-git-hooks: ^3.0
- friendsofphp/php-cs-fixer: ^3.85
- phpspec/prophecy: ^1.22
- phpunit/phpunit: 10.5.*
README
Json-Api is a framework-agnostic library that normalizes responses of your API in a standardized way based on the JSON:API specification. Also, it handles pagination and sorting by automatically parsing the request URL. You can use it in a vanilla PHP project or in any PHP framework.
For more information about the JSON:API specification, go to https://jsonapi.org/.
Features
- Generation of success and error responses
- Pagination specified in requests
- Sorting specified in requests
Installation
composer require webcoder01/json-api
Usage
If you want to learn more about request parsing, go to this page.
If you want to know how to generate a response, go to this page.