Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Json Api Server Laravel Package

tobyz/json-api-server

A JSON:API server for Laravel that turns Eloquent models into spec-compliant APIs with resource classes, relationship includes, filtering, sorting, pagination, and validation. It streamlines building standardized JSON:API endpoints.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API strategy standardization: Whether to expose your product via JSON:API (a formal spec with compound documents, sparse fieldsets, includes, filtering, sorting, pagination) versus a bespoke REST or GraphQL surface. This package makes the JSON:API path materially cheaper to evaluate — and as of v1.0.0-rc.1 it also generates OpenAPI schemas from your endpoints, which turns "do we adopt JSON:API?" into "do we get machine-readable API contracts for free?"
  • Developer experience and API-as-a-product roadmap: Auto-generated OpenAPI schema is a PM-level unlock — API reference docs, client SDK generation, contract testing, and partner onboarding can all be derived from the same source of truth rather than maintained by hand. Relevant if a public API, developer portal, or partner integration program is on the roadmap.
  • Build vs. buy for CRUD endpoints: It auto-generates a compliant JSON:API server from your Eloquent models, so the decision shifts from "how many sprints to build serializers, relationship endpoints, query parsing, and schema docs?" to "does auto-generation fit our domain model?" New endpoint hooks (Endpoint::response(), Endpoint::schema(), Create::saved(), Update::saved()) narrow the gap where bespoke logic previously forced a hand-rolled API.
  • Roadmap acceleration for multi-client products: A single generated API can serve web, mobile, and partner integrations without per-client endpoint work. Two new capabilities widen the addressable use cases: client-generated IDs (Id::writableOnCreate()) enable offline-first mobile creation and idempotent retries, and async processing (202 Accepted / 303 See Other) covers long-running operations that previously fell outside a synchronous CRUD generator.
  • API versioning and evolution strategy: JSON:API profiles (requested via Accept, activated on the response) let you ship opt-in capability changes — e.g. cursor pagination — without minting new API versions. This is a direct input to how you plan backward compatibility and deprecation policy.
  • Error UX and localization: Per-exception error overrides (JsonApi::errors()) with :key replacements and dedicated exception classes make consistent, translatable, client-friendly error payloads a configuration task rather than a custom layer — relevant for customer-facing APIs and multi-locale products.
  • Internal tooling and admin surfaces: Good fit for back-office/admin panels, internal data browsers, and prototypes where schema-driven endpoints are sufficient and speed matters more than bespoke business logic.
  • Architecture bets and delivery risk: Committing to schema-driven API generation is a long-term coupling decision (model conventions, naming, query behavior, field/ID definitions). This assessment informs whether that bet belongs in the architecture roadmap.
  • Risk register inputs: Ecosystem signals are unchanged — small star count, MIT license, minimal dependents — but v1.0.0-rc.1 shows substantial, active development. Read that as healthy but volatile: high velocity plus a large breaking-change surface means real upgrade cost, and a pre-1.0 API surface is not yet stable. Plan for a pinned version, an internal abstraction layer, and a recurring upgrade budget.

When to Consider This Package

Consider it when:

  • You have decided (or are seriously evaluating) JSON:API compliance as a product requirement — for client-driven includes, sparse fieldsets, standardized error/document formats, or profile-based opt-in capabilities.
  • Machine-readable API contracts are a deliverable: generated OpenAPI schemas can feed docs, SDKs, and contract tests, which is often the strongest standalone justification for adoption.
  • Your data layer is Laravel Eloquent and your resources map cleanly to models and relationships; much of the value comes from convention-over-configuration.
  • You need broad, uniform CRUD coverage across many resources fast (internal tools, MVPs, admin APIs) rather than a small number of heavily hand-crafted endpoints.
  • Your product needs client-generated IDs (offline-first mobile, idempotent creates) or asynchronous operations (202/303) — both are now supported rather than requiring escape hatches.
  • You can tolerate a small, single-maintainer-style ecosystem and are willing to pin a version, read the source, absorb breaking changes, and own upgrades.
  • You want a pilot-able dependency: it can be scoped to one internal API to validate fit before a product-wide commitment.

Look elsewhere when:

  • Endpoints are dominated by custom business logic, workflows, or non-CRUD operations that even the new endpoint hooks cannot express cleanly.
  • API stability is a hard requirement — pre-1.0 with a release of this breaking-change magnitude means the public surface is still moving; a long-horizon, unhedged platform bet is premature.
  • Your data layer isn't Eloquent, or your domain is not naturally relational/model-shaped.
  • You need enterprise-grade support, a large contributor base, or long-term vendor guarantees — the low star count and minimal dependents remain a real adoption risk.
  • Performance at scale requires hand-tuned queries and response shaping beyond what generated endpoints give you.
  • The team prefers GraphQL or a hand-rolled REST contract, or you need heavy bespoke versioning guarantees that profiles don't cover.

How to Pitch It (Stakeholders)

To executives: This is a low-cost, MIT-licensed accelerator for exposing our data through a standardized API. It now also generates OpenAPI schemas automatically, which means API documentation, client SDKs, and partner onboarding can come from the same source as the endpoints — compressing time to a client-facing API from weeks to days and reducing the drift between docs and reality. It supports multiple clients (web, mobile, partners) from one surface, and recent additions like client-generated IDs and asynchronous responses cover mobile-offline and long-running-operation scenarios that previously required custom work. The trade-offs are maturity and stability: it is a small, lightly adopted project, and the latest release is a large pre-1.0 breaking refactor, so we should treat it as a scoped pilot behind an internal abstraction layer with a pinned version and a planned upgrade budget — not a foundational, unhedged dependency. Recommended decision: pilot on one bounded internal API, measure delivery savings and upgrade cost across one version bump, then revisit for broader adoption.

To engineering: It removes the boilerplate of JSON:API — document structure, relationship endpoints, includes, sparse fieldsets, filtering, sorting, pagination, error objects, and now OpenAPI schema generation — by deriving endpoints from Eloquent models. The new hooks (Endpoint::response(), Endpoint::schema(), headers(), saved() callbacks, error overrides, Id field customization) provide legitimate escape hatches where custom logic used to disqualify the package. The cost is a large breaking-change surface in v1.0.0-rc.1 — Resource::getId() → Resource::id(): Id, singular ErrorProvider::getJsonApiError(), removed helpers (json_api_response(), Context::queryParam()), moved/renamed classes, and changed deserializer semantics — which means the API is not yet stable and upgrades will be real work. Mitigations: pin the version, read the source, isolate it behind our own API layer so it is replaceable, budget for upgrade work per release, and avoid it for endpoints with heavy custom logic. Ask: does our model layer map cleanly enough that generation is a net win, and do we have appetite for tracking a fast-moving pre-1.0 dependency?

Bottom line: worth a time-boxed pilot where standardized, schema-driven CRUD APIs and generated OpenAPI contracts are on the roadmap; the release strengthens the case with profiles, async processing, and real escape hatches, but the pre-1.0 breaking changes reinforce treating it as a replaceable, version-pinned component rather than a default choice for logic-heavy or long-horizon platform bets.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource