Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Json Api Laravel Package

neomerx/json-api

Framework-agnostic PHP library implementing JSON:API v1.1. Builds compliant documents, relationships, compound includes, meta and errors. Parses/validates Accept/Content-Type and query params (pagination, sorting, sparse fields) to return proper 415/406 responses.

View on GitHub
Deep Wiki
Context7
v4.0.1
  • Added BaseQueryParser::getIncludes method for easier usage with Encoder::withIncludedPaths (#243)
v4.0.0

Overall, versions 3 and 4 are nearly identical and the main changes were made in SchemaInterface. An extra parameter ContextInterface was added to SchemaInterface::getAttributes and SchemaInterface::getRelationships.

The context contains extra information about the resource such as its position in the data tree and encoder options such as filter fieldset and included paths. The context might be used for smarter loading resources from a database.

More in Upgrade Notes.

v3.0.5

Improved/fixed setting up include paths #238

v3.0.4
  • Fixed usage of Identifiers in arrays (e.g. to-many and belongs-to-many relationships) #235.
v3.0.3
  • Improved extensibility. Thanks to @66mm added a sample of how to add wildcards support to include paths. #231
v3.0.2
  • Added extra checks for data returned from user's Schemas. If the returned data are not convertible to JSON it will cause an error with detailed information where the developer should fix the issue. #230
v3.0.1

Thanks to contributions and ideas from @PabloKowalczyk performance increased for 10%+ #227 #228

v3.0.0
  • Added support for upcoming JSON API v1.1;
  • Increased performance * (2,3X faster for small data sets with only a few resources and 5,4X faster for big data sets between v2 and v3);
  • Added some improvements and fixes #218, #221, #223, #224
v3.0.0-rc.3
  • Added #223
  • Fixed #224
v3.0.0-rc.2
v3.0.0-rc.1
v2.0.7
  • An extra check is added for data from Schema's getRelationships to be compliant with the spec #217
v2.0.6
  • Added support for resources that might behave like arrays/collections (e.g. Yii CModel) #214
v2.0.5
  • Improved error messages #209
v2.0.4
  • BaseQueryParser refactored into PHP trait for better flexibility #204
  • Error improved for easier conversion and encoding of custom errors/exceptions to JSON API Errors #206
v2.0.3
  • Fixed: Overriding Schema default include paths with empty list via EncodingParameters do not work #203
v2.0.2
v1.0.9
  • Improved detection of invalid data coming from developer's Schemas #199
  • Fixed a bug with incorrect relationships inclusion. For example, if inclusion for comments is requested it will also include relationships comment, commen, comme, ..., and c #200
v2.0.1
  • Improved detection of invalid data coming from developer's Schemas #199
  • Fixed a bug with incorrect relationships inclusion. For example, if inclusion for comments is requested it will also include relationships comment, commen, comme, ..., and c #200
v2.0.0
  • PHP strong types were added to all applicable interface and class methods.
  • Code optimizations.
  • New HTTP header and query parameter parsers.
  • Removed deprecated (JSON API extensions, codec matcher).

Upgrade notes

v2.0.0-beta
v2.0.0-alpha
v1.0.8
  • Improved compatibility with PHP 7.2 #189
v1.0.7
  • Fixed #188
v1.0.6
  • Micro-optimization #186
  • Design tweaks #187
v1.0.5
  • Content-Type header will not be added to Responses without content #184
  • Improved error handling for HTTP header and HTTP query parsers #185
v1.0.4
  • Added a helper method to ErrorCollection to indicate issues with attributes field #181
v1.0.3
  • Removed unnecessary requirements to headers for requests with no content/body #178.
v1.0.2
  • #177
v1.0.1
  • Added support for encoding newly created objects (without ID). The resulting JSON will not have id property #175
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor