Download the PHP package steffenbrem/json-api-bundle without Composer
On this page you can find all versions of the php package steffenbrem/json-api-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download steffenbrem/json-api-bundle
More information about steffenbrem/json-api-bundle
Files in steffenbrem/json-api-bundle
Package json-api-bundle
Short Description Integration of JSON API with Symfony2 using JMS Serializer (FOSRestBundle).
License MIT
Informations about the package json-api-bundle
JsonApiBundle
Integration of JSON API with Symfony 2 (FOSRestBundle)
Note that this is stil a WIP and should not be used for production!
Usage
Coming soon
If you want to experiment with this implementation, you can just enable this bundle in your AppKernel
and everything should work directly. Try to serialize some annotated php classes and check it out!
Configuration reference
Annotations
@Resource
This will define your class as a JSON-API resource, and you can optionally set it's type name.
This annotation can be defined on a class.
Property | Default | Required | Content | Info |
---|---|---|---|---|
type | ~ | No | string | If left default, it will resolve its type dynamically based on the short class name. |
showLinkSelf | true | No | boolean | Add self link to the resource |
@Id (optional, it defaults to id
)
This will define the property that will be used as the id
of a resource. It needs to be unique for every resource of the same type.
This annotation can be defined on a property.
@Relationship
This will define a relationship that can be either a oneToMany
or manyToOne
. Optionally you can set includeByDefault
to include (sideload) the relationship with it's primary resource.
This annotation can be defined on a property.
Property | Default | Required | Content | Info |
---|---|---|---|---|
includeByDefault | false | No | boolean | This will include (sideload) the relationship with it's primary resource |
showData | false | No | boolean | Shows data , which consists of ids of the relationship data |
showLinkSelf | false | No | boolean | Add self link of the relationship |
showLinkRelated | false | No | boolean | Add related link of the relationship |
Configuration Reference
Example response
GET /api/channels
All versions of json-api-bundle with dependencies
symfony/framework-bundle Version ~2.3|~3.0
jms/serializer-bundle Version ~0.13|~1.0
pagerfanta/pagerfanta Version ~1.0
willdurand/hateoas Version >2.0