- Does hypecodeteam/swagger-ui-bundle work with Laravel?
- No. It is a Symfony bundle (HypeCodeTeam\SwaggerUiBundle), and Laravel does not run Symfony bundles. Laravel uses Symfony components but has no bundle registration or assets:install equivalent, so you would have to write a custom adapter. For Laravel, use a native package instead.
- How do I install hypecodeteam/swagger-ui-bundle in a Symfony app?
- Install it with Composer, enable the bundle in config/bundles.php, and configure the docs route and OpenAPI spec location. It registers a route such as /docs and serves bundled Swagger UI assets. Check the package composer constraints against your Symfony and PHP versions because compatibility is not verified.
- How do I configure the Swagger UI route and OpenAPI spec path?
- The bundle exposes configuration for the docs route and the spec source, which can be a local JSON or YAML file or a URL. Set the route, for example /docs, and point the UI at your OpenAPI artifact. Because the package is a thin wrapper, most behavior is just route registration plus static asset serving.
- Which Laravel versions are supported by swagger-ui-bundle?
- None. This is not a Laravel package and has no extra.laravel.providers discovery or Laravel version constraints. Treat any claim of Laravel support as a platform mismatch. If you need Laravel support, evaluate darkaonline/l5-swagger or knuckleswtf/scribe.
- What are the best Laravel alternatives for serving Swagger UI and OpenAPI docs?
- darkaonline/l5-swagger is the mature choice when you need OpenAPI generation plus Swagger UI. knuckleswtf/scribe is strong for generating docs from Laravel routes and annotations. Both have real install bases and active maintenance, unlike this single-maintainer Symfony bundle. A static Swagger UI bundle in public/ is also viable if you only need to render an existing spec.
- Is hypecodeteam/swagger-ui-bundle safe for production use?
- Treat it as high risk. It has 0 stars, 0 dependents, a single maintainer, and no visible release cadence or CI, so you become de facto maintainer. It also pins Swagger UI assets, and Swagger UI has had XSS-class issues in spec rendering. If the docs route is externally reachable, review or fork and patch the assets.
- What license does hypecodeteam/swagger-ui-bundle use?
- It is GPL-3.0, which is copyleft. If you ship distributed or on-prem software, that is likely a legal disqualifier and needs counsel review before merge. For hosted SaaS where code is not conveyed it may be manageable, but legal must sign off. This is a gating finding, not a footnote.
- Does swagger-ui-bundle serve Swagger UI assets offline without a CDN?
- Yes, that is its main genuine differentiator. It bundles Swagger UI assets and serves them from your app through the docs route instead of relying on a CDN. That helps with air-gapped or offline environments, but you own patching those pinned assets. For Laravel you can replicate this with a static asset bundle in public/.
- Can swagger-ui-bundle generate an OpenAPI spec from my Laravel routes?
- No. It only renders an existing OpenAPI or Swagger spec; it does not generate one from routes, controllers, or annotations. Spec generation is a separate concern, handled in Laravel by l5-swagger or Scribe. Confirm whether you already have an OpenAPI artifact before considering any viewer.
- How do I test the docs route if I adapt this bundle?
- In Symfony, use WebTestCase to request the configured docs route and assert a 200 HTML response containing the Swagger UI bootstrap. Also request the spec endpoint and assert it returns valid JSON or YAML with the expected OpenAPI version. In Laravel, any adapter you write is custom code, so cover route registration, asset responses, and spec path resolution with feature tests. Do not assume upstream tests exist.