A JSON:API server implementation in PHP.
Go to file
Andrei V. Goryunov 5f7c0d2da5 add support for filter expression 2022-09-13 16:31:08 +03:00
.github/workflows Run on ubuntu-18.04 to preserve PHP 7.3 2021-01-16 18:22:28 +10:30
docs 0.2.0-beta.5 2022-01-03 14:36:42 +11:00
src add support for filter expression 2022-09-13 16:31:08 +03:00
tests Fix tests 2022-01-03 14:34:07 +11:00
.gitattributes Clean up 2019-11-18 15:45:43 +10:30
.gitignore Refactor, docs 2020-11-21 16:30:16 +10:30
CHANGELOG.md Fix deprecation notice on PHP 8.1 2022-06-21 14:58:38 +09:30
LICENSE Add license 2018-12-14 12:05:31 +10:30
README.md Update README.md 2021-09-16 07:58:38 +10:00
composer.json Add support for `doctrine/inflector:^2.0` 2022-04-22 09:06:54 +09:30
package-lock.json Update vuepress deps 2021-05-09 10:41:40 +09:30
package.json Refactor, docs 2020-11-21 16:30:16 +10:30
phpunit.xml Initial commit 2018-12-14 11:57:28 +10:30

README.md

json-api-server

Pre Release License

json-api-server is a JSON:API server implementation in PHP.

It allows you to define your API's schema, and then use an adapter to connect it to your application's database layer. You don't have to worry about any of the server boilerplate, routing, query parameters, or JSON:API document formatting.

Based on your schema definition, the package will serve a complete JSON:API that conforms to the spec, including support for:

  • Showing individual resources (GET /api/articles/1)
  • Listing resource collections (GET /api/articles)
  • Sorting, filtering, pagination, and sparse fieldsets
  • Compound documents with inclusion of related resources
  • Creating resources (POST /api/articles)
  • Updating resources (PATCH /api/articles/1)
  • Deleting resources (DELETE /api/articles/1)
  • Error handling

The schema definition is extremely powerful and lets you easily apply permissions, transformations, validation, and custom filtering and sorting logic to build a fully functional API with ease.

Documentation

Read the documentation

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT