laravel-orion
laravel-orion copied to clipboard
OpenAPI specs for custom endpoints
Hi,
I'm using Laravel Sanctum for Authentication purposes, and I would like to add the route generated by Sanctum to Orion generated OpenAPI Specs file. From what I understand, the paths generated came from PathsBuilder
from resourcesCacheStore
, which I assume registered when using Orion::resource
on routes
file.
This works great with Orion specified Collections and operations, but it can't register any custom functions individually declared on routes file.
At the example above, Announcement
and Banner
were successfully generated, but routes such as /register
, /login
, and /me
were not specified on specs.json
file. Are there any way we can add these on specs file, or am I missing something? Thank you!
Hi @Testinger,
At this point, Orion cannot generate OpenAPI specs for custom endpoints (endpoints defined outside of Orion::
route scope), but I am working on making it possible to generate specs for such endpoints too.
For now, you can just add the necessary specs manually into the generated file - Orion won't remove those upon specs generation.