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

Sort request methods #1878

Merged
merged 1 commit into from Oct 16, 2022
Merged

Conversation

yotam2010
Copy link

@yotam2010 yotam2010 commented Oct 7, 2022

There is a bug with a random integer suffix for generated operation id when there is @RequestMapping without a specific method.

Similar to another issue that was solved already: #96

But the solution introduced for the closed issue didn't help in this case.

Added a test to show it is solved. You can reproduce the issue by reverting from TreeSet to HashSet and running the test multiple times (you will see you get different operation IDs randomly).

The reason is, HashSet does not guarantee the same order, so in different runs, it may produce different orders and therefor different operation ids.

It is my first open-source contribution so please let me know if I missed anything in the process.

@yotam2010
Copy link
Author

Output example of the bug (running the test I added twice without TreeSet):
Expected output
Actual output

@yotam2010
Copy link
Author

yotam2010 commented Oct 15, 2022

Hey @bnasslahsen, I saw you are active here, can you take a look at my PR when you got the time?

@bnasslahsen
Copy link
Contributor

@yotam2010,

Thank you for your contribution to the project1

@bnasslahsen bnasslahsen merged commit a8fb5e5 into springdoc:master Oct 16, 2022
bnasslahsen added a commit that referenced this pull request Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants