diff --git a/README.md b/README.md index 09e675c..b599848 100644 --- a/README.md +++ b/README.md @@ -150,14 +150,19 @@ It has support for generating & sending documents with: - v1.1 extensions via profiles - v1.1 @-members for JSON-LD and others +Also there's tools to help processing of incoming requests: + +- parse request options (include paths, sparse fieldsets, sort fields, pagination, filtering) +- parse request documents for creating, updating and deleting resources and relationships + Next to custom extensions, the following [official extensions](https://jsonapi.org/extensions/) are included: - Cursor Pagination ([example code](/examples/cursor_pagination_profile.php), [specification](https://jsonapi.org/profiles/ethanresnick/cursor-pagination/)) Plans for the future include: -- parse request options: sparse fields, sorting, pagination, filtering ([#44](https://github.com/lode/jsonapi/issues/44)) -- parse requests for creating, updating and deleting resources and relationships ([#5](https://github.com/lode/jsonapi/issues/5)) +- validate request options ([#58](https://github.com/lode/jsonapi/issues/58)) +- validate request documents ([#57](https://github.com/lode/jsonapi/issues/57)) ## Contributing diff --git a/composer.json b/composer.json index aeb7cc6..be3a040 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,10 @@ } }, "require-dev": { - "phpunit/phpunit": "^5.7|^6.5|^7.5|^8.0" + "phpunit/phpunit": "^5.7|^6.5|^7.5|^8.0", + "psr/http-message": "^1.0" + }, + "suggests": { + "psr/http-message": "Allows constructing requests from Psr RequestInterface" } } diff --git a/composer.lock b/composer.lock index 1b61b3a..95b64c8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "893b23bd2e3e1e2a4f08f72b322de18d", + "content-hash": "713fd198af3cd27832a25efabe345697", "packages": [], "packages-dev": [ { @@ -703,8 +703,62 @@ "mock", "xunit" ], + "abandoned": true, "time": "2017-06-30T09:13:00+00:00" }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -1395,5 +1449,6 @@ "platform": { "php": ">=5.6" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.0.0" } diff --git a/examples/index.html b/examples/index.html index 45100ac..8c1963c 100644 --- a/examples/index.html +++ b/examples/index.html @@ -45,6 +45,7 @@

Relationship responses

Misc