-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
Enum fields like allow_reserved in ParameterValue is not following the serde rename:
Lines 276 to 298 in d3bc658
| // 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels