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
Here is my issue : I'm working with Fiber framework and I'm use to generate server side logic (fiber-server parameter).
I try to know if there is a solution to order my routes because parameters can't be handled by the fiber router :
Router mess with parameter :template_visibility and
I've looked for some docs about order generation but I've found nothing. I also tried to change some values as name or re-order route declaration, that change nothing.
This is hitting you because we sort maps due to Go maps being randomized. However, kin-openapi has changed since you filed this bug, and now, i'm able to generate registration handlers in the order they appear in the specification.
I'm revisiting many old bugs, so pardon the long delay, but this will be fixed in the next release by registering all routes in the same order as the operations are defined in the spec.
Activity
Chroq commentedon Feb 4, 2025
Nobody as clue ?
I think it's possible to order routes in Fiber because placeholders should come first so no need to deal with a new parameter or something.
Should I try to send a PR ?
tuanvumaihuynh commentedon Mar 31, 2025
+1
iremsha commentedon Mar 31, 2025
Some useful issues from Fiber that show that we need to be able to manage the order of routers
Perhas easy-way make fork and patch this
tuanvumaihuynh commentedon Apr 1, 2025
@iremsha Thanks! I decided to go with embedding the generated spec using Redocly, and it works really well.
mromaszewicz commentedon Jul 13, 2026
This is hitting you because we sort maps due to Go maps being randomized. However, kin-openapi has changed since you filed this bug, and now, i'm able to generate registration handlers in the order they appear in the specification.
I'm revisiting many old bugs, so pardon the long delay, but this will be fixed in the next release by registering all routes in the same order as the operations are defined in the spec.
Register handlers in spec order (oapi-codegen#2465)
Add sort-handler-registrations flag to opt out of spec-order registra…
Add sort-handler-registrations flag to opt out of spec-order registra…