[rust-server] lacks support for `additionalProperties`
Created by: bjgill
Description
See https://github.com/swagger-api/swagger-codegen/issues/8089#issuecomment-389117445 - our main bar to using the same swagger spec for sample generation as the other generators is that rust-server
does not yet support additionalProperties
.
Admittedly, this seems like a non-trivial problem. rust-server
is intended to provide a distributed strongly-typed system. As soon as you add additionalProperties
, however, we lose the ability to be able to verify the contents of said additional properties.
A naive solution might be:
struct Foo {
bar: Option<i32>,
additionalProperties: HashMap<String, json::Object>,
};
However, this will fail as soon as we introduce non-json media types (e.g. XML, which rust-server
supports). As such, I'm not sure what a complete solution would look like...