- How do I install noitran/opendox in a Laravel application?
- Install it with Composer using composer require noitran/opendox, then publish the package assets and config with php artisan vendor:publish. Set the path to your existing OpenAPI 3.0 document in the published config file and the package exposes a route that renders it through Redoc or Swagger UI. Expect a short spike rather than a deep integration, since OpenDox only supplies the viewer layer.
- Does OpenDox work with Lumen as well as Laravel?
- Yes, the package is described as supporting both Lumen 5.5+ and Laravel 5.5+. Because Lumen does not use package auto-discovery, you register the OpenDox service provider manually in bootstrap/app.php. The same config publishing and spec path setup applies once the provider is registered.
- Which Laravel and PHP versions does noitran/opendox support?
- The package targets Laravel and Lumen 5.5 and later on PHP 7.x through 8.0. The last release was May 2021, so there is no evidence of compatibility work for Laravel 10, 11, or 12, or for PHP 8.2 and above. Validate the install on a throwaway branch against your exact PHP and framework versions before committing to it.
- How do I configure the OpenAPI spec path in OpenDox?
- After running php artisan vendor:publish, the package config file lets you point OpenDox at your OpenAPI 3.0 document, typically a JSON or YAML file shipped with the application. The same config exposes toggles for which UI is served and where the documentation route lives. OpenDox does not author or validate the spec, so the file must already be valid and complete.
- Does OpenDox generate the OpenAPI spec automatically from my Laravel code?
- No. OpenDox is not an annotation- or reflection-driven generator like swagger-php, Scramble, or Scribe; it hosts and renders a spec your team writes and maintains. That means the documentation only stays accurate if you have a process, ideally a CI validation step, keeping the spec current. If you want generation from routes and controllers, OpenDox is the wrong tool.
- How do I choose between Redoc and Swagger UI in OpenDox?
- Both UIs ship with the package and render the same single OpenAPI 3.0 document, so the choice is cosmetic and interactive rather than functional. Redoc gives a clean, read-focused three-panel layout, while Swagger UI 3 adds the try-it-out request console. A config toggle switches between them, and you can expose both routes if different audiences need different experiences.
- Can I protect the OpenDox documentation routes with authentication?
- Yes, the docs endpoints are ordinary Laravel routes, so you can attach middleware, auth guards, or an IP allowlist to them. This matters because API documentation endpoints are frequently left publicly exposed and reveal the full surface of your API. At minimum, restrict them by environment or gate them behind the same auth stack as the rest of your admin tooling.
- Is noitran/opendox still maintained and safe to use in production?
- The package has roughly twenty-two stars and no releases since May 2021, which makes it effectively single-maintainer, low-adoption software. The main risks are abandonment, no PHP 8.2+ or Laravel 10+ guarantees, no OpenAPI 3.1 support, and bundled Swagger UI 3 and Redoc assets pinned to 2021-era versions that may carry known CVEs. The MIT license is the mitigation: forking and owning the package internally is straightforward if you need it long term.
- What are the alternatives to OpenDox for Laravel API documentation?
- Scramble, Scribe, and l5-swagger are the common alternatives, and all three generate specs from your code rather than requiring you to author one by hand. Scramble and Scribe are well suited to modern Laravel and PHP versions, while l5-swagger builds on zircote/swagger-php and the Swagger UI ecosystem. OpenDox only makes sense if you already own an OpenAPI 3.0 document and just want a zero-build viewer.
- How hard is it to migrate to or away from OpenDox later?
- Migrating away is cheap because your OpenAPI 3.0 spec is portable and any other renderer can consume it, which is the package's main strategic virtue. Migrating to OpenDox from an older Swagger 2.0 setup is the harder direction: OpenDox does not convert specs, so you would rewrite or convert to OpenAPI 3.0 with a tool like swagger2openapi and review the result first. Treat the package swap as the trivial final step after the spec work is done.