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 Reference Laravel Package

league/json-reference

A PHP library for resolving JSON References, including JSON Pointers ($ref) in JSON documents and schemas. It dereferences local and remote references through a simple API, with support for custom retrievers and integration with JSON Schema tooling.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for $ref resolution. Any product that ingests JSON Schema (draft-04 and earlier) or OpenAPI/Swagger 2.0 documents eventually needs a resolver: follow a $ref, resolve it relative to the correct base URI, guard against circular references. That algorithm is deceptively fiddly. This package is a ready-made, MIT-licensed implementation, so "adopt a resolver" becomes a legitimate option instead of spending a sprint or two on one.
  • API tooling roadmap. Relevant surfaces: spec validators and linters, contract-testing tools, mock servers, doc generators, SDK/codegen pipelines, and "schema bundling" (turning a multi-file spec into a single self-contained file before shipping it to a customer or storing it).
  • Legacy compatibility decisions. If the roadmap includes supporting customers on Swagger 2.0 / draft-04 schemas while newer customers move to OpenAPI 3.1 / JSON Schema 2020-12, this library covers the old half of the reference model — and only the old half. That asymmetry is itself a roadmap input: dual-model support is a real cost, not a checkbox.
  • Migration and one-off tooling. Dereferencing a corpus of inherited specs before a re-platform, or diffing two versions of a contract, is exactly the short-lived, internal-only job where an archived dependency is acceptable.
  • A caution flag on the build-vs-buy scorecard. 32 stars, zero dependents, and an archived repository mean no upstream fixes, no security response, and no compatibility work as PHP versions move. Adopting this is a decision to own the code, whether or not you intend to.

When to Consider This Package

Consider it when:

  • You need to resolve $ref and JSON Pointers against draft-04-era JSON Schema or Swagger 2.0, including multi-file documents and id-based base-URI scoping.
  • The use case is internal, bounded, and short-lived — a migration script, an audit tool, a one-time bundler — where you can accept unpinned maintenance risk.
  • You want a readable reference implementation to learn from, or a fork point: MIT licensing plus a small, well-scoped surface area makes vendoring and owning it realistic.
  • You need something offline and dependency-light — no hosted service, no external API calls in the validation path.

Look elsewhere when:

  • You are building anything customer-facing or long-lived. An archived repository is a liability you must budget to maintain; if nobody will own a fork, do not adopt.
  • You need modern JSON Schema (2019-09 / 2020-12) or OpenAPI 3.1 semantics. The reference model changed materially; this library does not track it.
  • A maintained alternative already solves the whole job — schema validators that bundle reference resolution internally remove the need for a standalone resolver and shrink your dependency graph. Introducing a second, unmaintained library to do half of what your validator already does is a net negative.
  • You require vendor support, SLAs, or a security disclosure path.

How to Pitch It (Stakeholders)

To executives: A small, free, MIT-licensed PHP component that saves us from hand-writing one of the more error-prone pieces of API tooling — following and resolving schema references. It is not a platform investment: the project is archived, has effectively no user base, and will never receive another update. The right framing is "a reference implementation we can lift from and own," not "a dependency we adopt." Cost to adopt is near zero; cost to own is a fork we maintain ourselves. Recommend it only inside internal, time-boxed work, and only if engineering agrees to own the code.

To engineering: Treat this as source material, not a dependency. The valuable asset is the resolution logic — base-URI scoping, pointer traversal, circular-reference handling — which is genuinely tedious to get right and cheap to copy under MIT. Before adopting, confirm three things: (1) does our existing validator already resolve references, making this redundant; (2) does our target spec version actually match its draft-04-era model; (3) who owns the fork when a PHP upgrade breaks it. If the answer to (3) is "nobody," vendor the algorithm into our own codebase instead of adding a package manager entry — same benefit, no orphaned dependency, and no false expectation of upstream fixes.

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.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle