radebatz/openapi-introspector
radebatz/openapi-introspector inspects OpenAPI/Swagger specifications at runtime, exposing endpoints, schemas, and metadata to Laravel and PHP apps. It helps generate documentation, validate APIs, and integrate specs into tooling with a clean, framework-friendly API.
Install with composer require dermanomann/openapi-introspector and publish any package config if the service provider exposes one. Start by looking at the package’s attribute classes and the introspection command/route it registers, then annotate a single controller action with the package’s OpenAPI attributes. Generate the spec and inspect the output before rolling it across the API. The first practical use case is documenting an existing Laravel route without rewriting it: keep your route definitions, add attributes to the controller methods, and let the package merge route metadata into the OpenAPI output.
/users/{user} maps to the first {...} placeholder in the attribute path.https://api.example.com/v1, the package strips that prefix from route paths during introspection. Define server URLs at the document level and let route paths stay relative.servers URL. A server URL with a path prefix will be removed from route paths; a trailing slash or missing prefix can change the result.How can I help you explore Laravel packages today?