Closed s-dobson closed 3 years ago
Just as a follow up here is what I mean with screenshots.
Using Enable-PodeOpenApi -Path '/docs/openapi' -Title 'Lorem ipsum API' -Version 0.0.0.1
Using Enable-PodeOpenApi -Path '/docs/openapi' -Title 'Lorem ipsum API' -RouteFilter '/api/*' -Version 0.0.0.1
This could be a bug by the looks of it, I'll investigate and get back. Thanks!
Ah perfect, thanks for investigating!
Hey @s-dobson,
I managed to reproduce the issue, and the changes in the above commit fixes the ordering so it's more consistent. Are you able to make the same couple of changes in the above commit to your Pode module locally and test?
Thanks :)
I've merged the fix for this as testing shows the correct order now, but if it's still occurring please feel free to re-open :)
Hey @Badgerati ,
Sorry about the delay getting back to you.
I've just tested this and its working on v2.4.2,.
Thanks 👍
Question
Not sure if this is a question, bug or I'm just missing something.
I have the following routes (as an example): '/api/users/' '/api/users/user/:userId'
In a basic setup using 'Enable-Pode-OpenApi' these stay in the above order. However when using a "-RouteFilter '/api/*'" the order switches to: '/api/users/user/:userId' '/api/users/'
Obviously I would prefer the first example as the second route is a child of the first so this flows better and makes more sense to an end user.
I just wanted to see if I'm missing anything obvious, if this is intended or is a bug.
Thanks