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

Openapi Php Laravel Package

erasys/openapi-php

Erasys OpenAPI PHP lets you build OpenAPI 3 specifications directly in PHP using typed classes and fluent builders for schemas, paths, operations, parameters, and responses. Keep API documentation close to your code and easy to generate.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API documentation strategy: Decide whether the OpenAPI 3.0 spec is the contract of record for public, partner, or internal APIs. This package supports authoring and validating that spec in PHP, but it does not render a developer portal or host documentation.
  • Contract-first vs code-first: Helps teams standardize on a programmatically authored OpenAPI spec checked into source control. It is not a route/controller introspection tool, so it should be paired with a deliberate decision about whether specs are hand-maintained in PHP or generated elsewhere.
  • API governance in CI: Add spec validation to the Laravel CI pipeline to block invalid or incomplete OpenAPI documents before they reach docs, gateways, mock servers, or SDK generation.
  • Build vs buy for API tooling: Use this as a lightweight, MIT-licensed builder/validator rather than buying a full API design platform. Budget separately for rendering, hosting, linting, and discovery layers such as Redocly, Stoplight, Bump.sh, or an internal developer portal.
  • Developer-experience roadmap: Valid specs unlock generated client SDKs, contract tests, mock servers, and partner onboarding artifacts. This package is an enabling dependency, not the entire DX solution.
  • Release and versioning decisions: Supports defining API versioning, deprecation, and breaking-change policies because the spec can be validated as part of the release process.
  • Use cases: Laravel monoliths exposing APIs, internal platform APIs, partner integrations, regulated environments that require specs in the repo, and teams that prefer PHP-only tooling over Node/Java-based OpenAPI workflows.

When to Consider This Package

Consider it when:

  • Your team is PHP/Laravel-centric and wants to build or validate OpenAPI 3.0 specs without adding a separate Node or Java toolchain.
  • You need a small library for programmatic spec construction plus schema validation, not a full documentation UI or API design suite.
  • You already have a docs/rendering layer and want the spec to live alongside PHP code and CI.
  • You can pin the dependency and wrap it behind a small internal abstraction to limit lock-in.
  • Your spec scope is moderate and mostly OpenAPI 3.0; you do not need OpenAPI 3.1 support or advanced linting rules.

Look elsewhere when:

  • You expect automatic generation from Laravel routes, controllers, or annotations. Evaluate Laravel-specific options such as Scramble, Scribe, or swagger-php instead.
  • You need a hosted developer portal, visual API design, mock servers, or governance dashboards. This package is only one layer.
  • You need strong community support, frequent releases, or a large ecosystem. Twenty GitHub stars and a last release in November 2023 are maintenance-risk signals for a critical external developer platform.
  • You need enterprise-grade OpenAPI linting beyond schema validation. Use Spectral or Redocly CLI alongside, or instead of, this package.
  • You are not a PHP shop or cannot accept a niche third-party dependency in the API documentation path.

How to Pitch It (Stakeholders)

For executives: This is a small MIT-licensed PHP library that helps us produce valid OpenAPI specs and enforce them in CI. It reduces documentation drift, shortens partner onboarding, and lowers API support costs. It is not a strategic platform purchase and should be treated as a tactical tool: low cost, low lock-in, but also low community momentum, so we should not make it a single point of failure for an external developer platform.

For engineering: It gives us a Composer-installable OpenAPI 3.0 builder and validator that fits Laravel CI. We can keep the API contract in the repo, validate it on every build, and feed it to docs or SDK tooling. It does not introspect routes or render documentation, so we will pair it with our existing docs stack and a thin internal wrapper to isolate maintenance risk.

For product: Use it to make API contracts testable and releasable, not to replace the developer portal. The product win is fewer broken specs and faster partner integration; the product risk is dependency staleness. Approve it for internal or moderate-risk APIs, with a fallback plan and validation coverage, before using it on a flagship public API.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings