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

Remove calculateRequestOrder Function and fix bug #19685

Merged
merged 7 commits into from
Oct 8, 2024
Merged

Remove calculateRequestOrder Function and fix bug #19685

merged 7 commits into from
Oct 8, 2024

Conversation

DevMrRober
Copy link
Contributor

@DevMrRober DevMrRober commented Sep 26, 2024

Summary

This PR removes the calculateRequestOrder function. The previous function was deemed unnecessary due to its redundant logic and lack of unique functionality.

Changes made

  • Removed function calculateRequestOrder

  • Removed call to calculateRequestOrder function, which calculated the order of requests based on operationGroupingOrder and requestsSize.

  • Updated request creation logic:

    • Changed request creation logic to use requests.size() as the key in requests.putIfAbsent(), ensuring that each new request is added with a unique identifier based on the current size of the request map.

Reason for change

  • The original implementation included unnecessary complexity that generated a bug that only generated 2 operations if they were on the same path.

Tests

  • All existing tests have been run to ensure that no functionality has been affected by this change.
  • Requests are added correctly without being removed, and existing functionality remains intact.

Related issue

Reviewers

  • Please review the changes and provide feedback on the removal of the feature.

rmarqmo added 2 commits September 26, 2024 11:25
This PR removes the calculateRequestOrder function from the codebase and addresses the bug described in issue #19110. After a thorough review, it was determined that the function was unnecessary due to its redundant logic and lack of unique functionality.
@wing328
Copy link
Member

wing328 commented Sep 27, 2024

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@wing328
Copy link
Member

wing328 commented Sep 27, 2024

cc @mostafa

@wing328 wing328 added Client: k6 Enhancement: Code Cleanup General refactoring, removal of deprecated things, commenting, etc. Issue: Bug labels Sep 27, 2024
DevMrRober and others added 5 commits September 27, 2024 08:17
…/github.com/DevMrRober/openapi-generator into fix/remove-calculateRequestOrder-issue19110
This PR removes the calculateRequestOrder function from the codebase and addresses the bug described in issue #19110. After a thorough review, it was determined that the function was unnecessary due to its redundant logic and lack of unique functionality.
…/github.com/DevMrRober/openapi-generator into fix/remove-calculateRequestOrder-issue19110
@DevMrRober
Copy link
Contributor Author

Sorry, I made a mistake the first time, it should be right now.

Copy link
Contributor

@mostafa mostafa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for your contribution.

@DevMrRober
Copy link
Contributor Author

@wing328 when will this PR be applied?

@wing328 wing328 merged commit 7c84177 into OpenAPITools:master Oct 8, 2024
14 of 15 checks passed
@wing328
Copy link
Member

wing328 commented Oct 8, 2024

just merged. thanks for the PR

samples updated via 25b8341

@DevMrRober DevMrRober deleted the fix/remove-calculateRequestOrder-issue19110 branch October 8, 2024 10:53
@wing328 wing328 added this to the 7.10.0 milestone Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client: k6 Enhancement: Code Cleanup General refactoring, removal of deprecated things, commenting, etc. Issue: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants