{"id":13796156,"url":"https://github.com/mtarld/api-platform-ms-bundle","last_synced_at":"2025-07-26T21:06:36.297Z","repository":{"id":41173156,"uuid":"254556964","full_name":"mtarld/api-platform-ms-bundle","owner":"mtarld","description":"A set of tools to use Api Platform in a microservice context","archived":false,"fork":false,"pushed_at":"2025-05-05T14:32:59.000Z","size":200,"stargazers_count":70,"open_issues_count":4,"forks_count":8,"subscribers_count":5,"default_branch":"1.x","last_synced_at":"2025-07-21T16:14:03.794Z","etag":null,"topics":["api-platform","microservice-bundle","symfony"],"latest_commit_sha":null,"homepage":"","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/mtarld.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"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}},"created_at":"2020-04-10T06:04:14.000Z","updated_at":"2025-07-09T06:30:56.000Z","dependencies_parsed_at":"2024-10-26T00:41:05.319Z","dependency_job_id":"19994528-df49-41cf-ad7a-049ad77d47a5","html_url":"https://github.com/mtarld/api-platform-ms-bundle","commit_stats":{"total_commits":53,"total_committers":7,"mean_commits":7.571428571428571,"dds":0.3207547169811321,"last_synced_commit":"4f4afd381383b6048ceb4b3bbc9646e53a4b345e"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/mtarld/api-platform-ms-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtarld%2Fapi-platform-ms-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtarld%2Fapi-platform-ms-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtarld%2Fapi-platform-ms-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtarld%2Fapi-platform-ms-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtarld","download_url":"https://codeload.github.com/mtarld/api-platform-ms-bundle/tar.gz/refs/heads/1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtarld%2Fapi-platform-ms-bundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266336357,"owners_count":23913403,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api-platform","microservice-bundle","symfony"],"created_at":"2024-08-03T23:01:06.862Z","updated_at":"2025-07-26T21:06:36.194Z","avatar_url":"https://github.com/mtarld.png","language":"PHP","funding_links":[],"categories":["Table of Contents"],"sub_categories":["awesome-api-platform-bundles"],"readme":"# API Platform Microservice Bundle\n\n![Packagist](https://img.shields.io/packagist/v/mtarld/api-platform-ms-bundle.svg)\n![GitHub](https://img.shields.io/github/license/mtarld/api-platform-ms-bundle.svg)\n[![Actions Status](https://github.com/mtarld/symbok-bundle/workflows/CI/badge.svg)](https://github.com/mtarld/api-platform-ms-bundle/actions)\n\nA Microservice tools bundle for API Platform.\n\n## A microservice bundle ?\nIn a microservice context where each microservices are API Platform instances,\neach instance must behave as an API Platform data producer and an\nAPI Platform data consumer.\n\nBut API Platform isn't intended to behave like a client.\n\nTherefore, here comes the API Platform Microservice Bundle!\n\nThis bundle intents to provide a set of [tools](#provided-tools)\nto ease the development of client behaving microservices by trying to abstract the http call layer.\n\n## Getting started\n### Installation\nYou can easily install API Platform Microservice bundle by composer\n```\n$ composer require mtarld/api-platform-ms-bundle\n```\nThen, bundle should be registered. Just verify that `config\\bundles.php` is containing :\n```php\nMtarld\\ApiPlatformMsBundle\\ApiPlatformMsBundle::class =\u003e ['all' =\u003e true],\n```\n\n### Configuration\nOnce the bundle is installed, you should configure it to fit your needs. \n\nTo do so, edit `config/packages/api_platform_ms.yaml` and `config/routes/api_platform_ms.yaml`\n```yaml\n# config/packages/api_platform_ms.yaml\n\napi_platform_ms:\n    # HttpClient that will be used internally (default: 'Symfony\\Contracts\\HttpClient\\HttpClientInterface')\n    http_client: ~\n\n    # Name of the current microservice (required)\n    name: client\n\n    # Option to log request (default '%kernel.debug%')\n    log_request: true\n\n    # Host used for microservice dynamic routes generation (default: [])\n    hosts:\n        - https://client.api\n\n    # List of related microservices\n    microservices:\n        # Microservice name\n        product:\n            # Microservice base uri (required)\n            base_uri: https://product.api\n\n            # Microservice API path (default: '')\n            api_path: /api\n\n            # Microservice format (required)\n            # Supported formats: jsonld, jsonhal, jsonapi\n            format: jsonld\n```\n```yaml\n# config/routes/api_platform_ms.yaml\n\napi_platform_ms:\n    resource: '@ApiPlatformMsBundle/Resources/config/routes.xml'\n    prefix: /api\n```\nAnd you're ready to go ! :rocket:\n\n## Provided tools\n- [**API resource existence constraint**](src/Resources/doc/tools/existence-constraint.md):\n  Help you to ensure that the related resources are existing on the other microservice when doing validation.\n  \n- [**Resource collection and pagination**](src/Resources/doc/tools/pagination.md):\n  Handy objects and services to ease paginated collection iteration.\n  \n- [**HTTP repository**](src/Resources/doc/tools/http-repository.md):\n  An extendable HTTP repository that you could configure to fetch resources.\n\n- [**HTTP client wrappers**](src/Resources/doc/tools/http-wrapper.md):\n  Clients that adapt HTTP calls according to the targeted microservice configuration.\n\n- [**Authentication header providers**](src/Resources/doc/tools/authentication-header-provider.md):\n  Providers that dynamically inject authentication headers in requests.\n\n- [**ConstraintViolation list denormalizer**](src/Resources/doc/tools/constraint-violation-list.md):\n  Allows you to create a `ConstraintViolationList` instance from a serialized string.\n\n- [**Extension points**](src/Resources/doc/tools/extension-points.md):\n  Events that you can listen to extend the bundle behavior.\n\n## Supported microservice formats\nCurrently, API Platform supported formats are:\n- jsonld\n- jsonapi\n- jsonhal\n\n## Contributing\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\nAfter writing your fix/feature, you can run following commands to make sure that everything is still ok.\n\n```bash\n# Install dev dependencies\n$ composer install\n\n# Running tests locally\n$ make test\n```\n\n## Authors\n - Mathias Arlaud - [mtarld](https://github.com/mtarld) - \u003cmathias(dot)arlaud@gmail(dot)com\u003e\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtarld%2Fapi-platform-ms-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtarld%2Fapi-platform-ms-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtarld%2Fapi-platform-ms-bundle/lists"}