定制 haddowg/json-api-symfony 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

haddowg/json-api-symfony

Composer 安装命令:

composer require haddowg/json-api-symfony

包简介

Symfony bundle for haddowg/json-api: idiomatic routing, content negotiation, validation, and a Doctrine data layer for spec-compliant JSON:API 1.1 endpoints.

README 文档

README

CI

Part of the jsonapi.rest suite — a complete, spec-compliant JSON:API 1.1 stack for PHP: a framework-agnostic core, this Symfony bundle, a Laravel package, and a typed TypeScript client, bound together by one conformance-tested OpenAPI 3.1 contract.

A Symfony bundle that makes haddowg/json-api idiomatic in a Symfony application: register a JSON:API type as a service and get the standard JSON:API 1.1 endpoint set — idiomatic routing, content negotiation, spec-compliant error documents, constraint validation, and a reference Doctrine data layer — with no controller, no operation handler, and no serializer wired by hand.

It is the Symfony twin of the Laravel package: both build on the same framework-agnostic core and project a byte-identical OpenAPI document for an identical domain, so a client generator consumes either backend unchanged.

Requirements

  • PHP 8.3, 8.4, or 8.5
  • Symfony 6.4, 7.x, or 8.x

Doctrine, the validator, the opis linter, and strict email are opt-in (suggest dependencies) — install one to enable that capability, leave it out and the path is simply absent. See the optional-dependency matrix.

Installation

composer require haddowg/json-api-symfony

Composer pulls the core library and the PSR-7 bridge it needs. Registering the bundle and importing its routes — the one step that surprises everyone, since the bundle mounts no routes until you ask it to — is covered in install.

Documentation

Full documentation is published at haddowg.github.io/json-api-symfony. Start with install and getting started, or browse the documentation index.

Core concepts (fields, relations, constraints, response value objects) live in the core documentation.

Demo

docker compose up from examples/music-catalog-symfony boots the full music-catalog service — curl http://localhost:8080/albums, with interactive OpenAPI docs (Swagger UI) at http://localhost:8080/docs. The getting-started guide walks the same example.

Licence

Released under the MIT Licence.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固