A JSON:API server implementation in PHP.
Go to file
SychO9 fc137cff85 feat: Allow using advanced validation rules
Like callbacks and Rule instances implementing the laravel Rule contract.
2021-12-02 17:00:03 +01:00
.github/workflows Run on ubuntu-18.04 to preserve PHP 7.3 2021-01-16 18:22:28 +10:30
docs Rename Type::newModel for consistency with Adapter 2021-08-31 16:43:02 +10:00
src feat: Allow using advanced validation rules 2021-12-02 17:00:03 +01:00
tests Add error response tests 2021-09-01 21:22:46 +10: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 typos 2021-09-05 17:25:36 +10:00
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 Fix dependency on `http-accept` now that a version has been tagged 2021-09-03 09:49:23 +10:00
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