{"id":17001611,"url":"https://github.com/juliangut/json-api","last_synced_at":"2026-03-10T14:01:42.638Z","repository":{"id":57002837,"uuid":"122273176","full_name":"juliangut/json-api","owner":"juliangut","description":"PSR-15 aware json-api integration","archived":false,"fork":false,"pushed_at":"2024-07-15T17:06:33.000Z","size":300,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T11:13:06.851Z","etag":null,"topics":["json","json-api","psr15","psr7","psr7-middleware"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juliangut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"juliangut"}},"created_at":"2018-02-21T00:11:25.000Z","updated_at":"2023-05-24T15:45:25.000Z","dependencies_parsed_at":"2022-08-21T14:10:39.205Z","dependency_job_id":"5b863d49-c466-4dff-966c-2e5964c56fa6","html_url":"https://github.com/juliangut/json-api","commit_stats":{"total_commits":50,"total_committers":1,"mean_commits":50.0,"dds":0.0,"last_synced_commit":"6e7a1eee9fa6892e08826ff9172c3b7fe3f1f3d1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juliangut/json-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliangut%2Fjson-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliangut%2Fjson-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliangut%2Fjson-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliangut%2Fjson-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliangut","download_url":"https://codeload.github.com/juliangut/json-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliangut%2Fjson-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30336061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","json-api","psr15","psr7","psr7-middleware"],"created_at":"2024-10-14T04:25:32.326Z","updated_at":"2026-03-10T14:01:42.590Z","avatar_url":"https://github.com/juliangut.png","language":"PHP","funding_links":["https://github.com/sponsors/juliangut"],"categories":[],"sub_categories":[],"readme":"[![PHP version](https://img.shields.io/badge/PHP-%3E%3D8.0-8892BF.svg?style=flat-square)](http://php.net)\n[![Latest Version](https://img.shields.io/packagist/v/juliangut/json-api.svg?style=flat-square)](https://packagist.org/packages/juliangut/json-api)\n[![License](https://img.shields.io/github/license/juliangut/json-api.svg?style=flat-square)](https://github.com/juliangut/json-api/blob/master/LICENSE)\n\n[![Total Downloads](https://img.shields.io/packagist/dt/juliangut/json-api.svg?style=flat-square)](https://packagist.org/packages/juliangut/json-api/stats)\n[![Monthly Downloads](https://img.shields.io/packagist/dm/juliangut/json-api.svg?style=flat-square)](https://packagist.org/packages/juliangut/json-api/stats)\n\n# json-api\n\nEasy JSON:API integration.\n\n## Installation\n\n### Composer\n\n```\ncomposer require juliangut/json-api\n```\n\nsymfony/yaml to parse yaml files\n\n```\ncomposer require symfony/yaml\n```\n\n## Usage\n\nRequire composer autoload file\n\n```php\nrequire './vendor/autoload.php';\n```\n\n```php\nuse Jgut\\JsonApi\\Manager;\nuse Jgut\\JsonApi\\Configuration;\nuse Neomerx\\JsonApi\\Schema\\Error;\n\n$configuration = new Configuration([\n    'sources' =\u003e ['/path/to/resource/files'],\n]);\n\n$jsonApiManager = new Manager($configuration);\n\n// Get encoded errors\n$jsonApiManager-\u003eencodeErrors(new Error());\n\n// Get encoded resources\n$jsonApiManager-\u003eencodeResources(new MyClass(), new ServerRequestInstance());\n```\n\n### Configuration\n\n* `sources` must be an array containing arrays of configurations to create MappingDriver objects:\n    * `type` one of \\Jgut\\JsonApi\\Mapping\\Driver\\DriverFactory constants: `DRIVER_ATTRIBUTE`, `DRIVER_PHP`, `DRIVER_JSON`, `DRIVER_XML`, `DRIVER_YAML` or `DRIVER_ANNOTATION` **if no driver, defaults to DRIVER_ATTRIBUTE**\n    * `path` a string path or array of paths to where mapping files are located (files or directories) **REQUIRED if no driver**\n    * `driver` an already created \\Jgut\\JsonApi\\Mapping\\Driver\\DriverInterface object **REQUIRED if no type AND path**\n* `attributeName` name of the PSR-7 Request attribute that will hold query parameters for resource encoding, defaults to 'JSON_API_query_parameters'\n* `schema` class name implementing \\Jgut\\JsonApi\\Schema\\MetadataSchemaInterface (\\Jgut\\JsonApi\\Schema\\MetadataSchema by default)\n* `prefix` prefix for generated URLs\n* `metadataResolver` an instance of \\Jgut\\Mapping\\Metadata\\MetadataResolver. It is highly recommended to provide a PSR-16 cache to metadata resolver on production\n* `encodingOptions` global encoding options, an instance of \\Jgut\\JsonApi\\Encoding\\OptionsInterface\n* `jsonApiVersion` none by default\n* `jsonApiMeta` optional global metadata\n\n## Middleware\n\nUse PSR-15 middleware `Jgut\\JsonApi\\Middleware\\JsonApiMiddleware` in order to validate request being a valid JSON:API specification request\n\n```php\nuse Jgut\\JsonApi\\Manager;\nuse Jgut\\JsonApi\\Middleware\\JsonApiMiddleware;\nuse Psr\\Http\\Message\\ResponseFactoryInterface;\n\n/** @var ResponseFactoryInterface $responseFactory */\n/** @var Manager $jsonApiManager */\n\n$middleware = new JsonApiMiddleware($responseFactory, $jsonApiManager);\n\n// Add the middleware to any PSR-15 compatible library/framework, such as Slim, Mezzio, etc \n```\n\n## Console command\n\n```php\nuse Symfony\\Component\\Console\\Application;\nuse Jgut\\Slim\\PHPDI\\Command\\ListCommand;\n\n/** @var \\Slim\\App $app */\n$container = $app-\u003egetContainer();\n\n$cli = new Application('Slim CLI');\n$cli-\u003eadd(new ListCommand($container));\n\n$app-\u003erun();\n```\n\n### List container definitions\n\nList defined container definitions supporting searching\n\n## Resource mapping\n\nResources can be defined in two basic ways: by writing them down in definition files of various types or directly defined in attributes on classes\n\n### Attributes\n\n#### ResourceObject (Class level)\n\nIdentifies each JSON:API resource. Its presence is mandatory in each resource class\n\nAccepts an optional \"name\" that overrides default (class name with lowercase first letter)\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Attribute\\ResourceObject;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\ResourcePrefix;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\ResourceSchema;\n\n#[ResourceObject(\n    name: 'company',\n    prefix: 'resourcePrefix',\n    schema: 'customSchemaClass',\n    meta: ['meta1' =\u003e 'value'],\n)]\nclass Company\n{\n}\n```\n\n* `name`, optional, resource name, lowercase first letter class name by default\n* `prefix`, optional, resource url prefix when links are included\n* `schema`, optional, class name implementing \\Jgut\\JsonApi\\Schema\\MetadataSchemaInterface. Override default one\n\n#### Identifier (Property level)\n\nThe resource identifier\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Getter;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Identifier;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\ResourceObject;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Setter;\n\n#[ResourceObject]\nclass Owner\n{\n    #[Identifier(\n        name: 'identifier',\n        getter: 'getIdentifier',\n        setter: 'setIdentifier',\n        meta: ['meta1' =\u003e 'value'],\n    )]\n    protected string $id;\n}\n```\n\n* `name`, optional, identifier name, lowercase first letter property name by default\n* `getter`, optional, method in the class that gives access to the property. By default, uppercase first letter property name prefixed by \"is\" for booleans or \"get\" for the rest of types\n* `setter`, optional, method in the class that sets the value for the property, uppercase first letter property name prefixed by \"set\"\n* `meta`, optional, list of optional array/value array of identifier metadata\n\n#### Attribute (Property level)\n\nA resource attribute\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Attribute;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Getter;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\ResourceObject;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Setter;\n\n#[ResourceObject]\nclass Company\n{\n    #[Attribute(\n        name: 'title',\n        getter: 'getTitle',\n        setter: 'setTitle',\n        groups: ['view'],\n    )]\n    protected string $title;\n}\n```\n\n* `name`, optional, attribute name, lowercase first letter property name by default\n* `getter`, optional, method in the class that gives access to the property. By default, uppercase first letter property name prefixed by \"is\" for booleans or \"get\" for the rest of types\n* `setter`, optional, method in the class that sets the value for the property, uppercase first letter property name prefixed by \"set\"\n* `groups`, optional, array of groups to which the attribute belongs\n\n#### Relationship (Property level)\n\nA resource relationship\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Relationship;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\ResourceObject;\n\n#[ResourceObject]\nclass Company\n{\n    #[Relationship(\n        name: 'owner',\n        getter: 'getOwner',\n        setter: 'setOwner',\n        groups: ['view'],\n    )]\n    protected Owner $companyOwner;\n}\n```\n\n* `name`, optional, relationship name, lowercase first letter property name by default\n* `getter`, optional, method in the class that gives access to the property. By default, uppercase first letter property name prefixed by \"is\" for booleans or \"get\" for the rest of types\n* `setter`, optional, method in the class that sets the value for the property, uppercase first letter property name prefixed by \"set\"\n* `groups`, optional, array of groups to which the relationship belongs\n\n#### Links\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Link;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\LinkRelated;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\LinkSelf;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\ResourceObject;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Relationship;\n\n#[ResourceObject]\n#[LinkSelf(false)]\n#[LinkRelated]\n#[Link(\n    href: 'http://...',\n    title: 'example',\n    meta: ['meta1' =\u003e 'value'],\n)]\nclass Company\n{\n    #[Relationship]\n    #[LinkSelf]\n    #[LinkRelated(false)]\n    #[Link(\n        href: 'http://...',\n        title: 'example',\n        meta: ['meta1' =\u003e 'value'],\n    )]\n    protected Owner $companyOwner;\n}\n```\n\n##### LinkSelf (Class level)\n\nDetermines whether self link is included in the response\n\n##### LinkRelated (Class level)\n\nDetermines whether self link is included in the response when the resource is included as a relationship\n\n##### Link (Class and Property level)\n\nAdds as many custom link to the resource or field as needed\n\n* `href`, required, href of the link\n* `title`, optional, link title\n* `meta`, optional, list of optional link metadata (see metadata section below)\n\n#### Metadata\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Attribute;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Meta;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\Relationship;\nuse Jgut\\JsonApi\\Mapping\\Attribute\\ResourceObject;\n\n#[ResourceObject]\n#[Meta(key: 'meta1', value: 'value')]\nclass Company\n{\n    #[Identifier]\n    #[Meta(key: 'meta2', value: 'value')]\n    protected string $id;\n    \n    #[Relationship]\n    #[Meta(key: 'meta3', value: 'value')]\n    #[Meta(key: 'meta4', value: 'value')]\n    protected Owner $owner;\n}\n```\n\nThere are two kinds of metadata:\n\n##### Meta Attribute (Class and Property level)\n\nAssign one or more metadata to a resource, identifier or relationship\n\n* `key`, required, metadata key\n* `value`, required, metadata value\n\n##### Other metadata\n\nLink attributes accept metadata as a key/value array\n\n### Definition files\n\n##### PHP\n\n```php\nreturn [\n    [\n        'class' =\u003e 'CompanyClass',\n        'name' =\u003e 'company',\n        'prefix' =\u003e 'company',\n        'schema' =\u003e 'MetadataCompanySchemaClass',\n        'linkSelf' =\u003e true,\n        'linkRelated' =\u003e false,\n        'meta' =\u003e [\n            'meta1' =\u003e 'value',\n        ],\n        'identifier' =\u003e [\n            'property' =\u003e 'uuid',\n            'name' =\u003e 'id',\n            'getter' =\u003e 'getUuid',\n            'setter' =\u003e 'setUuid',\n            'meta' =\u003e [\n                'meta2' =\u003e 'value',\n            ]\n        ],\n        'attributes' =\u003e [\n            [\n                'property' =\u003e 'email',\n                'name' =\u003e 'email',\n                'getter' =\u003e 'getEmail',\n                'setter' =\u003e 'setEmail',\n            ],\n        ],\n        'relationships' =\u003e [\n            [\n                'class' =\u003e 'OwnerClass',\n                'property' =\u003e 'owner',\n                'name' =\u003e 'owner',\n                'linkSelf' =\u003e true,\n                'linkRelated' =\u003e true,\n                'links' =\u003e [\n                    'example' =\u003e [\n                        'href' =\u003e 'http://example.com',\n                        'meta' =\u003e [\n                            'meta3' =\u003e 'value',\n                        ],\n                    ],\n                ],\n                'meta' =\u003e [\n                    'meta4' =\u003e 'value',\n                ],\n            ],\n        ],\n    ],\n];\n```\n\n##### JSON\n\n```json\n[\n  {\n    \"class\": \"CompanyClass\",\n    \"name\": \"company\",\n    \"prefix\": \"company\",\n    \"schema\": \"MetadataCompanySchemaClass\",\n    \"linkSelf\": true,\n    \"linkRelated\": false,\n    \"meta\": {\n      \"meta1\": \"value\"\n    },\n    \"identifier\": {\n      \"property\": \"uuid\",\n      \"name\": \"id\",\n      \"getter\": \"getUuid\",\n      \"setter\": \"setUuid\",\n      \"meta\": {\n        \"meta2\": \"value\"\n      }\n    },\n    \"attributes\": [\n      {\n        \"property\": \"email\",\n        \"name\": \"email\",\n        \"getter\": \"getEmail\",\n        \"setter\": \"setEmail\"\n      }\n    ],\n    \"relationships\": [\n      {\n        \"class\": \"OwnerClass\",\n        \"property\": \"owner\",\n        \"name\": \"owner\",\n        \"linkSelf\": true,\n        \"linkRelated\": true,\n        \"links\": {\n          \"example\": {\n            \"href\": \"http://example.com\",\n            \"meta\": {\n              \"meta3\": \"value\"\n            }\n          }\n        },\n        \"meta\": {\n          \"meta4\": \"value\"\n        }\n      }\n    ]\n  }\n]\n```\n\n##### XML\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003croot\u003e\n  \u003cresource\n    class=\"CompanyClass\"\n    name=\"company\"\n    prefix=\"company\"\n    schema=\"MetadataCompanySchemaClass\"\n    linkSelf=\"true\"\n    linkRelated=\"false\"\n  \u003e\n    \u003cmeta\u003e\n      \u003cmeta1\u003evalue\u003c/meta1\u003e\n    \u003c/meta\u003e\n    \u003cidentifier property=\"uuid\" name=\"id\" getter=\"getUuid\" setter=\"setUuid\"\u003e\n      \u003cmeta\u003e\n        \u003cmeta2\u003evalue\u003c/meta2\u003e\n      \u003c/meta\u003e\n    \u003c/identifier\u003e\n    \u003cattributes\u003e\n      \u003cattribute1 property=\"email\" name=\"email\" getter=\"getEmail\" setter=\"setEmail\"/\u003e\n    \u003c/attributes\u003e\n    \u003crelationships\u003e\n      \u003crelationship1 class=\"OwnerClass\" property=\"owner\" name=\"owner\" linkSelf=\"true\" linkRelated=\"true\"\u003e\n        \u003clinks\u003e\n          \u003cexample href=\"http://example.com\"\u003e\n            \u003cmeta\u003e\n              \u003cmeta3\u003evalue\u003c/meta3\u003e\n            \u003c/meta\u003e\n          \u003c/example\u003e\n        \u003c/links\u003e\n        \u003cmeta\u003e\n          \u003cmeta4\u003evalue\u003c/meta4\u003e\n        \u003c/meta\u003e\n      \u003c/relationship1\u003e\n    \u003c/relationships\u003e\n  \u003c/resource\u003e\n\u003c/root\u003e\n```\n\n##### YAML\n\n```yaml\n- class: \"CompanyClass\"\n  name: \"company\"\n  prefix: \"company\"\n  schema: \"MetadataCompanySchemaClass\"\n  linkSelf: true\n  linkRelated: false\n  meta:\n    meta1: \"value\"\n  identifier:\n    property\": \"uuid\"\n    name: \"id\"\n    getter: \"getUuid\"\n    setter: \"setUuid\"\n    meta:\n      meta2: \"value\"\n  attributes:\n    - property: \"email\"\n      name: \"email\"\n      getter: \"getEmail\"\n      setter: \"setEmail\"\n  relationships:\n    - class: \"OwnerClass\"\n      property: \"owner\"\n      name: \"owner\"\n      linkSelf: true\n      linkRelated: true\n      links:\n        example:\n          href: \"http://example.com\"\n          meta:\n            meta3: \"value\"\n      meta:\n        meta4: \"value\"\n```\n\n### Annotations\n\n__Annotations are deprecated and will be removed eventually. Use Attribute mapping when possible__.\n\nYou need to require Doctrine's annotation package\n\n```\ncomposer require doctrine/annotations\n```\n\n#### ResourceObject (Class level)\n\nIdentifies each resource. Its presence is mandatory on each resource class\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Annotation as JJM;\n\n/**\n * @JJM\\ResourceObject(\n *     name=\"company\",\n *     schema=\"CustomSchemaClass\",\n *     prefix=\"resourcePrefix\",\n *     linkSelf=true,\n *     linkRelated=false,\n *     links={\"link1\": \"http://...\", \"link2\": \"http://...\"},\n *     meta={\"meta1\" =\u003e \"value\", \"meta2\" =\u003e \"value\"}\n * )\n */\nclass Company\n{\n}\n```\n\n* `name`, optional, resource name, lowercase first letter class name by default\n* `prefix`, optional, resource url prefix when links are included\n* `schema`, optional, class name implementing \\Jgut\\JsonApi\\Schema\\MetadataSchemaInterface. Override default one\n* `linkSelf`, optional bool, display self link, null by default\n* `linkRelated`, optional bool, display self link when included, null by default\n* `links`, optional, list of optional key/value array of resource links\n* `meta`, optional, list of optional array/value array of resource metadata\n\n#### Identifier (Property level)\n\nThe resource identifier\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Annotation as JJM;\n\n/**\n * @JJM\\ResourceObject\n */\nclass Owner\n{\n    /**\n     * @JJM\\Identifier(\n     *     name=\"id\",\n     *     getter=\"getId\",\n     *     setter=\"setId\",\n     *     meta={\"meta1\" =\u003e \"value\", \"meta2\" =\u003e \"value\"}\n     * )\n     */\n    protected $id;\n}\n```\n\n* `name`, optional, identifier name, lowercase first letter property name by default\n* `getter`, optional, method in the class that gives access to the property. By default, uppercase first letter property name prefixed by \"is\" for booleans or \"get\" for the rest of types\n* `setter`, optional, method in the class that sets the value for the property, uppercase first letter property name prefixed by \"set\"\n* `meta`, optional, list of optional array/value array of identifier metadata\n\n#### Attribute (Property level)\n\nDefines each and every attribute accessible on the resource\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Annotation as JJM;\n\n/**\n * @JJM\\ResourceObject\n */\nclass Company\n{\n    /**\n     * @JJM\\Attribute(\n     *     name=\"email\",\n     *     getter=\"getEmail\",\n     *     setter=\"setEmail\",\n     *     groups={\"view\"}\n     * )\n     */\n    protected string $email;\n}\n```\n\n* `name`, optional, attribute name, lowercase first letter property name by default\n* `getter`, optional, method in the class that gives access to the property. By default, uppercase first letter property name prefixed by \"is\" for booleans or \"get\" for the rest of types\n* `setter`, optional, method in the class that sets the value for the property, uppercase first letter property name prefixed by \"set\"\n* `groups`, optional, array of groups to which the attribute belongs\n\n#### Relationship (Property level)\n\nIdentifies this resource relationships\n\n```php\nuse Jgut\\JsonApi\\Mapping\\Annotation as JJM;\n\n/**\n * @JJM\\ResourceObject\n */\nclass Company\n{\n    /**\n     * @JJM\\Relationship(\n     *     name=\"company\",\n     *     getter=\"getCompany\",\n     *     setter=\"setCompany\",\n     *     groups=[\"view\"]\n     *     linkSelf=true,\n     *     linkRelated=false,\n     *     links={\"link1\": \"http://...\", \"link2\": \"http://...\"],\n     *     meta={\"meta1\" =\u003e ·\"value\", \"meta2\" =\u003e \"value\"}\n     * )\n     */\n    protected Owner $company;\n}\n```\n\n* `name`, optional, relationship name, lowercase first letter property name by default\n* `getter`, optional, method in the class that gives access to the property. By default, uppercase first letter property name prefixed by \"is\" for booleans or \"get\" for the rest of types\n* `setter`, optional, method in the class that sets the value for the property, uppercase first letter property name prefixed by \"set\"\n* `groups`, optional, array of groups to which the relationship belongs\n* `linkSelf`, optional bool, display self link, null by default\n* `linkRelated`, optional bool, display self link when included, null by default\n* `links`, optional, list of optional key/value array of resource links\n* `meta`, optional, list of optional array/value array of relationship metadata\n\n## Contributing\n\nFound a bug or have a feature request? [Please open a new issue](https://github.com/juliangut/json-api/issues). Have a look at existing issues before.\n\nSee file [CONTRIBUTING.md](https://github.com/juliangut/json-api/blob/master/CONTRIBUTING.md)\n\n## License\n\nSee file [LICENSE](https://github.com/juliangut/json-api/blob/master/LICENSE) included with the source code for a copy of the license terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliangut%2Fjson-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliangut%2Fjson-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliangut%2Fjson-api/lists"}