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

Support Generating IndexMap Instead of HashMap #985

Open
JosiahBull opened this issue Nov 28, 2024 · 2 comments
Open

Support Generating IndexMap Instead of HashMap #985

JosiahBull opened this issue Nov 28, 2024 · 2 comments

Comments

@JosiahBull
Copy link
Contributor

For some usecases, e.g. snapshots in tests, consistent ordering via IndexMap would be preferred over a randomly ordered HashMap in generated clients.

I am happy to do the work required to allow users of the progenitor library to opt-in to this feature via a feature flag or as the default. I can alternatively extend support this feature via the x-rust-type mechanism, with a special case when path is equal to indexmap::IndexMap or indexmap::IndexSet to enable this feature.

Let me know if this is in-scope for the features you'd like progenitor to support and I'll open a PR. 👍

@JosiahBull
Copy link
Contributor Author

Just found this related issue: oxidecomputer/typify#555

Would support be welcome all the way through into Progenitor, or only in Typify?

@ahl
Copy link
Collaborator

ahl commented Dec 3, 2024

For sure. Plumb it right on through!

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

No branches or pull requests

2 participants