Open snpschaaf opened 2 years ago
IndexMap has a custom serde function: https://docs.rs/indexmap/latest/indexmap/serde_seq/index.html
@SBechstedt
@GREsau does it make sens to you to provide a serde_seq module via the schemars crate depending on the cfg feature? IMO this would be a cleaner way of achieving the desired de-/serialization in a feature-aware way and importing the indexmap crate would not be needed any longer.
My suggestion: https://github.com/GREsau/schemars/pull/161
So the problem is that the extensions
field does not preserve the order correctly?
So the problem is that the
extensions
field does not preserve the order correctly?
The extension field was serialized correctly into a OAS JSON. During our golden unit test (#107) we noticed all deserialized extensions
fields are empty (extension={}
). You already mentioned this problem here.
The 'extensions' fields of various structs within okapi/src/openapi3.rs was not deserialized correctly.
was empty.
The 'extensions' fields used a custom type 'Object'. 'Object' is an alias for IndexMap or BTreeMap depending on feature 'preserve_order'. Deserialisation should work for both.
Using rocket_okapi enables the feature 'preserve_order' by default.
Belongs to https://github.com/GREsau/okapi/issues/67