Skip to content

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

Copy link

@darrelmiller
Copy link
Member

I did say that, and I do think the Sort method is useful. However, ASPNET have asked for this to be supported in the WriterSettings so they do not have to go around and sort all the collections.

@MaggieKimani1
Copy link
Contributor

Closing as superseded by #2363

@baywet baywet deleted the mw/provide-a-sort-method-to-reorder-dictionary branch June 2, 2025 16:18
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

4 participants