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

Laravel Api Docs Laravel Package

dedoc/laravel-api-docs

Generate OpenAPI documentation directly from your Laravel routes and code with a built-in UI for browsing endpoints. Keeps API docs in sync and reduces manual spec maintenance.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: Scramble is a Laravel-native OpenAPI generator that infers a spec directly from routes, controllers, form requests, and Eloquent models — no hand-maintained annotations. It slots into the framework rather than sitting beside it, which is a good fit for a Laravel API codebase that wants documentation to track code automatically. It is a dev/CI-time dependency, not a runtime one, so it does not affect request-path architecture or deployment topology.

Integration feasibility: Low-friction. Installation is a single Composer require plus config publish, and spec exposure is typically a single registered route gated to non-production. The main effort is not wiring it up but validating that the generated document matches what our API actually does and what our consumers expect. The OpenAPI 3.2 support added in v0.13.48 is opt-in (3.1 remains default, emitting 3.1.2), which keeps the upgrade path contained.

Technical risk: The headline risk is the toArray → serializeAs31 serialization change. The release notes scope it to consumers who extended or overrode toArray on Generator-namespace OpenAPI objects; teams using the package as-is are unaffected. Because Scramble is still pre-1.0, this is a reminder that minor version bumps can carry breaking behavior — we should pin versions and review changelogs rather than float. Secondary risks: single-maintainer bus factor, and inference-based generation can silently misdescribe endpoints when type hints or validation rules are ambiguous. OpenAPI 3.2 adoption is also ahead of many downstream tooling consumers.

Key questions:

  • Do we override or extend toArray anywhere in our customization layer, or register custom OpenAPI object extensions?
  • Which OpenAPI version do our consumers (SDK generators, gateways, API portals) actually support — is 3.1 safe, and is 3.2 viable in the near term?
  • Do we need hierarchical tags, or is flat tagging sufficient for our resource grouping?
  • What is our tolerance for pre-1.0 churn, and do we have a version-pinning and changelog-review policy?
  • How will we detect spec drift or misinferred schemas — is a CI snapshot/diff check in place?

Integration Approach

Stack fit: Direct. Scramble assumes standard Laravel idioms (route model binding, form requests, API resources), so a conventional Laravel API gains coverage with near-zero annotation overhead. It does not conflict with runtime concerns like Sanctum/Passport auth, and can coexist with other doc tooling during a comparison period.

Migration path: For a greenfield install this is straightforward — Composer require, publish config, register the docs route behind an environment gate. If we already maintain hand-written or Scribe-generated specs, run Scramble in parallel first, diff the generated document against the incumbent, and close gaps via targeted configuration (type overrides, custom extensions) before retiring the old source of truth.

Compatibility: Confirm PHP and Laravel version floors against our runtime before adoption. The OpenAPI 3.2 output is opt-in, so we should explicitly choose our emitted version rather than inherit defaults, and validate that choice against every downstream consumer. Because 3.2 is new, expect uneven tooling support; defaulting to 3.1 is the safer initial posture.

Sequencing:

  1. Pin an explicit version and install in non-production only.
  2. Generate the spec and diff against existing documentation; catalogue discrepancies.
  3. Audit the codebase for toArray overrides or Generator-object customization that this release would break.
  4. Validate the emitted document against downstream tooling (SDK generation, importers, gateways).
  5. Add CI snapshot/diff checks so spec changes are reviewed like code changes.
  6. Roll out to staging docs portal, then production, with a documented rollback (revert version pin).

Operational Impact

Maintenance: Active project with a steady release cadence and a recent new contributor, which is a positive signal. However, pre-1.0 status means upgrade reviews are mandatory rather than routine; budget recurring time each cycle to read changelogs and re-validate the generated spec. Treat the version pin as load-bearing.

Support: Community-supported OSS. Issue triage depends on maintainer bandwidth, and the project appears centered on a small number of maintainers — a real bus-factor consideration for a documentation pipeline. We should be prepared to self-diagnose inference problems and, if needed, fork or pin rather than assume upstream responsiveness.

Scaling: Generation is build/CI-time, so it does not add production latency. Cost scales with route and model surface area; large APIs will see slower generation, and this release's performance work ("optimize self-out performance") is a welcome incremental improvement. Cache or artifact the generated spec in CI and avoid regenerating per request. Memory and time should be monitored as the route count grows.

Failure modes:

  • Silent misgeneration: ambiguous types or validation rules produce an inaccurate but plausible-looking spec with no error — the most dangerous failure, since consumers trust the document.
  • Breaking serialization: customizations relying on toArray silently stop being applied after this release rather than erroring loudly.
  • Version mismatch: emitting 3.2 into consumers that only understand 3.1 or 3.0 causes downstream breakage.
  • Docs drift: without CI diffing, the published spec can diverge from actual behavior undetected.
  • Dependency churn: a pre-1.0 minor bump introduces unexpected behavior changes in an otherwise stable pipeline.

Ramp-up: Low for the default happy path — most Laravel engineers can install and get a usable spec within an afternoon. Moderate for teams needing customization (custom type mappings, extensions, tag hierarchy, auth scheme tuning), where understanding of Scramble's inference internals and the OpenAPI object model is required. Plan for one engineer to own the documentation pipeline and the upgrade-review process so the bus factor stays internal.

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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core