diff --git a/openapi/src/codegen.rs b/openapi/src/codegen.rs index adc2db34f..e5596c79f 100644 --- a/openapi/src/codegen.rs +++ b/openapi/src/codegen.rs @@ -1290,6 +1290,11 @@ pub fn gen_field_rust_type>( // currency_options field is represented by an optional HashMap, where the String is the currency code in ISO 4217 format. if field_name == "currency_options" { state.use_params.insert("CurrencyMap"); + + if ty.contains("CurrencyMap<") { + return ty; + } + return format!("Option>", ty); } diff --git a/src/resources/generated/price.rs b/src/resources/generated/price.rs index ea16cbc08..2b1ada8d6 100644 --- a/src/resources/generated/price.rs +++ b/src/resources/generated/price.rs @@ -487,7 +487,7 @@ pub struct UpdatePrice<'a> { /// /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[serde(skip_serializing_if = "Option::is_none")] - pub currency_options: Option>>>, + pub currency_options: Option>, /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")]