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

kevupton/laravel-swagger

A Laravel package for adding Swagger/OpenAPI documentation to your application, helping you generate and serve interactive API docs alongside your routes. Useful for teams that want browsable, spec-based reference for their Laravel endpoints without leaving the framework.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Documentation-as-a-deliverable vs. documentation-as-a-chore. The core value of an annotations generator is turning "write OpenAPI by hand" into "derive the spec from code you already wrote." That's a roadmap-level decision about whether the API contract lives in the repo alongside routes/controllers, or in a separate spec repo maintained by hand.
  • Build vs. buy for API docs tooling. If an API portal is on the roadmap (partner integrations, public API, SDK generation, contract testing in CI), this package is a candidate for the generate-from-code half of that pipeline. It sits in the same evaluation slot as zircote/swagger-php + darkaonline/l5-swagger (annotation-first) or dedoc/scramble (zero-annotation, derived from code).
  • Retrofitting docs onto an existing Laravel API. The strongest concrete use case: a legacy Laravel app with many undocumented routes where the fastest path to a first-draft spec is generating annotations from route definitions, then editing for accuracy. Buy a week of engineering time back on a documentation backlog item.
  • Prioritizing which APIs get documented first. A generator makes breadth cheap, so the roadmap question shifts from "can we afford to document all endpoints" to "which endpoints are customer-facing and worth polishing."
  • Risk-tiering dependencies by blast radius. This is a dev/docs-time dependency, not a runtime one. That materially lowers the bar for adoption — a broken docs generator doesn't take production down, which is exactly the kind of dependency a PM can approve quickly.
  • Use cases it plausibly serves: internal API reference, partner/onboarding docs, QA contract checks, Postman/collection generation, and reducing the "docs drift" support burden on engineering.

When to Consider This Package

Adopt only under narrow conditions:

  • Legacy stack, already annotation-based. You're on an older Laravel (5.x-era) and the team is comfortable with Swagger/OpenAPI 2.0-style annotations. Verify PHP and Laravel version compatibility before committing — this is the single most likely blocker.
  • You need scaffolding, not a permanent dependency. The best framing is a one-time or time-boxed tool: generate a first pass of annotations, then vendor or fork it and drop it from composer.json if it stalls. Treat it as a script, not a platform.
  • You can accept maintenance ownership. With 18 stars and a low health score, assume no upstream support. Require: pinned version, someone on the team who can patch it, and a documented fallback to swagger-php directly.
  • Docs-only scope. If the output feeds CI gates, client SDK generation, or published public API contracts, you need a maintained toolchain with OpenAPI 3.x support — not this.

Look elsewhere when:

  • You need OpenAPI 3.x, PHP 8 attributes, or Laravel 9/10/11. Use zircote/swagger-php (annotations/attributes) with darkaonline/l5-swagger for UI, or dedoc/scramble if you want zero-annotation generation from routes and form requests.
  • You want human-readable docs plus a Postman collection with minimal annotation effort — knuckleswtf/scribe is the better fit.
  • The team wants design-first. If the spec is the source of truth (Stoplight, a spec repo, generated server stubs), generating annotations from implementation code inverts the workflow you want.
  • You need long-term support, security review sign-off, or an SLA. A near-dormant package won't clear those gates regardless of how good the idea is.

How to Pitch It (Stakeholders)

To executives: This is a small, low-risk developer tool that turns existing Laravel code into API documentation automatically, cutting the manual effort behind partner-facing docs, API portals, and onboarding. It's cheap to trial and can't affect production because it only runs at build/documentation time. The caveat is maturity: it's a niche package with minimal community adoption, so I'd frame approval as a time-boxed pilot (2–3 weeks, one API surface) rather than a platform commitment, with a pre-agreed exit to swagger-php or Scramble if it doesn't hold up.

To engineering: It scaffolds Swagger annotations from Laravel routes, which removes the most tedious part of documenting an existing API. Expect to verify version compatibility with our Laravel/PHP baseline, and expect to own the code — upstream is effectively static. Recommendation: use it as a throwaway scaffolding step on legacy services, and standardize on zircote/swagger-php + l5-swagger (annotation-driven) or dedoc/scramble (auto-derived, no annotations to maintain) as the durable path for new work. Either way, the decision gets us to a checked-in, CI-validated OpenAPI contract — that's the outcome worth funding, and the specific package is replaceable.

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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator