You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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.
alexzarbn
changed the title
How to add Laravel Sanctum and custom functions to OpenAPI specs
OpenAPI specs for custom endpoints
Sep 20, 2022
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
fromresourcesCacheStore
, which I assume registered when usingOrion::resource
onroutes
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
andBanner
were successfully generated, but routes such as/register
,/login
, and/me
were not specified onspecs.json
file. Are there any way we can add these on specs file, or am I missing something? Thank you!The text was updated successfully, but these errors were encountered: