seedwing-io / seedwing-policy

A functional type system for policy inspection, audit and enforcement.
https://www.seedwing.io
Apache License 2.0
12 stars 15 forks source link

refactor: use an IndexMap to sort Response data fields #208

Closed jcrossley3 closed 1 year ago

jcrossley3 commented 1 year ago

I'm not sure if this is better or not yet

This is an attempt to eliminate the custom serialize logic from Response while still allowing users to set the order of fields.

It was inspired as an alternative to #207

Some of the tests are still failing, but I stopped short of debugging them until someone else thinks this is an appropriate direction. I'm not convinced.

ctron commented 1 year ago

I think this is heading in the wrong direction. This will make it more brittle when doing changes to the struct, or to way it gets populated.