Skip to content

feat: add sort method to dictionary #2308

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Michael-Wamae
Copy link
Contributor

  • provide a sort method to reorder dictionary

fixes #1314

@Michael-Wamae Michael-Wamae requested a review from a team as a code owner April 8, 2025 12:32
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

While this is a first step, I don't think it addresses the core concern: serialization uses the order provided by the document when deserialized. But the consumer want's to control the serialization order.

How do you expect consumers to use this?

@Michael-Wamae
Copy link
Contributor Author

From the clarification from @darrelmiller we are to provide a Sort() method to reorder all dictionary-based collections. By default we maintain the order provided by the user but in the case there's need to reorder the can use the sort() method on the dictionary

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.

Make it possible to have a deterministic order in serialized OpenApi files
2 participants