Enum fields like allow_reserved in ParameterValue is not following the serde rename:
|
// maybe this should just been inlined into Parameter as fields? |
|
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] |
|
#[cfg_attr(feature = "impl_json_schema", derive(JsonSchema))] |
|
#[serde(untagged, rename_all = "camelCase")] |
|
#[allow(clippy::large_enum_variant)] // Removing this requires breaking changes to API. |
|
pub enum ParameterValue { |
|
Schema { |
|
#[serde(default, skip_serializing_if = "Option::is_none")] |
|
style: Option<ParameterStyle>, |
|
#[serde(default, skip_serializing_if = "Option::is_none")] |
|
explode: Option<bool>, |
|
#[serde(default, skip_serializing_if = "is_false")] |
|
allow_reserved: bool, |
|
schema: SchemaObject, |
|
#[serde(default, skip_serializing_if = "Option::is_none")] |
|
example: Option<Value>, |
|
#[serde(default, skip_serializing_if = "Option::is_none")] |
|
examples: Option<Map<String, Example>>, |
|
}, |
|
Content { |
|
content: Map<String, MediaType>, |
|
}, |
|
} |
It needs rename_all_fields specified to work on the enum fields: https://serde.rs/container-attrs.html
This causes it to fail OpenAPI spec validation
Enum fields like
allow_reservedinParameterValueis not following the serde rename:okapi/okapi/src/openapi3.rs
Lines 276 to 298 in d3bc658
It needs
rename_all_fieldsspecified to work on the enum fields: https://serde.rs/container-attrs.htmlThis causes it to fail OpenAPI spec validation