knuckleswtf / scribe

Generate API documentation for humans from your Laravel codebase.✍
https://scribe.knuckles.wtf/laravel/
MIT License
1.7k stars 303 forks source link

Sorting endpoints of the default group #754

Open Nicolas-Mousten-WeCode opened 11 months ago

Nicolas-Mousten-WeCode commented 11 months ago

Scribe version

4.25

Your question

I have been trying to sort the default group's endpoints for a while now, how do i do it i tried: 'groups' => [ 'default' => 'Endpoints',

    'order' => [
        'Endpoints' => [
            'POST /oauth/token',
            '*',
        ],
    ],
],

But it dosen't work, but when i moved though all my endpoints and added a group to them they were able to get sorted then. is the default group not sortable?

Docs

shalvah commented 10 months ago

It should be...unless maybe I'm missing something, and the default group label is only applied after the sorting (which may actually be the case) 🤔

shalvah commented 10 months ago

If that's the case, I'd welcome a PR to fix this. The fix here would be to assign the fallback group during generation of endpoint info, not during the output phase.