Weave 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 Common Laravel Package

enm/json-api-common

JSON API Common provides shared PHP classes and interfaces for building JSON:API-compliant servers and clients. It powers enm/json-api-server and enm/json-api-client, covering resources, relationships, links, documents, errors, and requests.

View on GitHub
Deep Wiki
Context7
3.2.0
  1. added "merge" to resource collections
  2. added "merge" to relationship collections
  3. added "merge" to link collections
3.1.0
  1. merged "added \Countable interface to collections"
3.0.1
  1. ignore case match for simple collection keys
  2. ad content type header as default for requests
Version

Model changes:

  1. renamed all occurrences of method "metaInformations" to "metaInformation"
  2. renamed method ResourceInterface::getType() to ResourceInterface::type()
  3. renamed method ResourceInterface::getId() to ResourceInterface::id()
  4. renamed method RelationshipInterface::getType() to RelationshipInterface::type()
  5. renamed method RelationshipInterface::getName() to RelationshipInterface::name()
  6. renamed method LinkInterface::getType() to LinkInterface::type()
  7. renamed method LinkInterface::getName() to LinkInterface::name()
  8. renamed method ErrorInterface::getStatus() to LinkInterface::status()
  9. renamed method ErrorInterface::getCode() to LinkInterface::code()
  10. renamed method ErrorInterface::getTitle() to LinkInterface::title()
  11. renamed method ErrorInterface::getDetail() to LinkInterface::detail()
  12. added method "createLink" to LinkCollectionInterface
  13. removed method "getType", which was only relevant for serializer, from DocumentInterface
  14. added method "httpStatus" to DocumentInterface
  15. added method "withHttpStatus" to DocumentInterface, to modify the status of a document
  16. added method "shouldBeHandledAsCollection", which indicates if a document contains a collection or not, to DocumentInterface
  17. added method "jsonApi", which contains information about the version, to DocumentInterface
  18. added model class Document as default implementation of DocumentInterface
  19. removed class AbstractDocument (use Document instead)
  20. removed class ResourceDocument (use Document instead)
  21. removed class ResourceCollectionDocument (use Document instead)
  22. removed class RelationshipDocument (use Document instead)
  23. removed class RelationshipCollectionDocument (use Document instead)
  24. removed class ErrorDocument (use Document instead)
  25. added interface JsonApiInterface for information about the used version in documents
  26. added model class JsonApi as default implementation of JsonApiInterface for information about the used version in documents
  27. added interface DocumentFactoryInterface and class DocumentFactory
  28. added interface ResourceFactoryInterface and class ResourceFactory
  29. added class ResourceFactoryRegistry
  30. added interface RelationshipFactoryInterface and class RelationshipFactory
  31. added interface FetchRequestInterface
  32. added class FetchRequest
  33. added interface JsonApiRequestInterface
  34. added class JsonApiRequest
  35. added interface SaveRequestInterface
  36. added class RelationshipModificationRequest
  37. added class SaveSingleResourceRequest

Serializer changes:

  1. added argument "identifiersOnly" as second argument of DocumentSerializerInterface::serializeDocument
  2. added the key "jsonapi" to output of Serializer::serializeDocument
  3. added interface DocumentDeserializerInterface
  4. added class Deserializer as default implementation of DocumentDeserializerInterface

new in 2.0.0

  1. added JsonApiInterface and JsonApiTrait
  2. added interface JsonApiAwareInterface and trait JsonApiAwareTrait
3.1.2
  1. Request: define array properties default as empty array
3.1.1
  1. merged "Fix relationships URL"
  2. merged "Declare public constant for json api Content-Type"
  3. fixed #11 ("CreatedResponse does not return document")
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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast