{"id":19092069,"url":"https://github.com/eosnewmedia/json-api-server-bundle","last_synced_at":"2025-07-05T11:33:09.907Z","repository":{"id":56978008,"uuid":"93738828","full_name":"eosnewmedia/JSON-API-Server-Bundle","owner":"eosnewmedia","description":"The symfony integration for enm/json-api-server.","archived":false,"fork":false,"pushed_at":"2023-02-02T09:56:25.000Z","size":134,"stargazers_count":10,"open_issues_count":5,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T15:51:14.241Z","etag":null,"topics":["abstraction","api","api-server","json","json-api","php","php7","reusable","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"https://eosnewmedia.github.io/JSON-API-Server-Bundle/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eosnewmedia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-08T10:50:11.000Z","updated_at":"2023-03-19T21:05:18.000Z","dependencies_parsed_at":"2023-02-17T18:00:31.304Z","dependency_job_id":null,"html_url":"https://github.com/eosnewmedia/JSON-API-Server-Bundle","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eosnewmedia%2FJSON-API-Server-Bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eosnewmedia%2FJSON-API-Server-Bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eosnewmedia%2FJSON-API-Server-Bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eosnewmedia%2FJSON-API-Server-Bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eosnewmedia","download_url":"https://codeload.github.com/eosnewmedia/JSON-API-Server-Bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249500337,"owners_count":21282385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["abstraction","api","api-server","json","json-api","php","php7","reusable","symfony","symfony-bundle"],"created_at":"2024-11-09T03:18:00.987Z","updated_at":"2025-04-18T13:34:24.782Z","avatar_url":"https://github.com/eosnewmedia.png","language":"PHP","readme":"JSON API Server-Bundle\n======================\n[![Build Status](https://travis-ci.org/eosnewmedia/JSON-API-Server-Bundle.svg?branch=master)](https://travis-ci.org/eosnewmedia/JSON-API-Server-Bundle)\n\nThe symfony integration for [`enm/json-api-server`](https://eosnewmedia.github.io/JSON-API-Server/).\n\n## Installation\n\n    composer require enm/json-api-server-bundle\n\n*****\n\n## Documentation\nYou should read the docs of [`enm/json-api-server`](https://eosnewmedia.github.io/JSON-API-Server/) first,\nsince this bundle only integrate its functionalities into your symfony project.\n\n1. [Configuration](#configuration)\n    1. [Bundles](#bundles)\n    1. [Config](#config)\n    1. [Routing](#routing)\n1. [Request Handler](#request-handler)\n1. [Error Handling](#error-handling)\n\n*****\n*****\n\n## Configuration\n\n### Bundles\n\n```php\n\u003c?php\n// confing/bundles.php\nreturn [\n    // ...\n    Enm\\Bundle\\JsonApi\\Server\\EnmJsonApiServerBundle::class =\u003e ['all' =\u003e true],\n    // ...\n];\n\n```\n\n*****\n\n### Config\nAll bundle configurations are optional.\n\n```yaml\n# config/packages/(dev/|prod/|test/|)enm_json_api.yaml\nenm_json_api_server:\n    debug: false\n    url_prefix: '' # configure this to use a url prefix for your json api routes: e.g. /api/{type}. only needed if a prefix is defined in your routing\n    route_name_prefix: 'enm.json_api' # Prefix of the route names in symfony (for exception handling). only needed if a nam prefix is defined in your routing\n```\n\n*****\n\n### Routing\n\n```yaml\n# app/config/routing.yml | config/routes.yaml\njson_api:\n  resource: \"@EnmJsonApiServerBundle/Resources/config/routing.xml\"\n```\n\nIf you use the predefined routing (without api prefix configuration), the following routes will be matched:\n\n    GET /{type}\n    \n    GET /{type}/{id}\n    \n    GET /{type}/{id}/relationships/{relationship}\n    \n    GET /{type}/{id}/{relationship}\n    \n    POST /{type}\n    \n    PATCH /{type}/{id}\n    \n    DELETE /{type}/{id}\n    \n    POST /{type}/{id}/relationships/{relationship}\n    \n    PATCH /{type}/{id}/relationships/{relationship}\n    \n    DELETE /{type}/{id}/relationships/{relationship}\n\n*****\n\n## Request Handler\nEach request handler can simply be registered via the service container (tag: `json_api_server.request_handler`):\n\n```yml\nAppBundle\\RequestHandler\\YourRequestHandler:\n    tags:\n      - { name: json_api_server.request_handler, type: 'myResources' }\n```\n\nThe tag attribute `type` must contain the json api resource type which will be handled by this request handler.\n\n*****\n\n## Error Handling\nThe bundle will handle all exceptions and convert them to valid json api error responses.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feosnewmedia%2Fjson-api-server-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feosnewmedia%2Fjson-api-server-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feosnewmedia%2Fjson-api-server-bundle/lists"}