Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting of operations to be prevented #2835

Closed
mpsshubham opened this issue Jan 7, 2025 · 2 comments
Closed

Sorting of operations to be prevented #2835

mpsshubham opened this issue Jan 7, 2025 · 2 comments
Labels
question Further information is requested

Comments

@mpsshubham
Copy link

Is your feature request related to a problem? Please describe.
I am using alphabetic sort for tags using alpha sort for tags in application properties, but inside one tag i don't want to perform sorting for operations, basically my use case is that operations should be displayed always as in the order they are written in code

How do i achieve this ?

Shall i add some order tag on operations ?

@ML-Marco
Copy link
Contributor

I don't think that is possible. Methods within a class are in no particular order.
https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getMethods--

The elements in the returned array are not sorted and are not in any particular order.

@bnasslahsen
Copy link
Collaborator

bnasslahsen commented Jan 18, 2025

@mpsshubham,

Use OpenApiCustomizer, where you have control and force the desired order for all the elements.
A sample is proposed here: #890

@bnasslahsen bnasslahsen added the question Further information is requested label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants