On the stable branch we have enums like UpTo manually defined on the types crate, but that's not the case for next branch, and some autogenerated enums ends up serializing incorrectly.
To Reproduce
Try to create a price with up_to: CreatePriceTiersUpTo::Inf on any tier.
Expected behavior
The price should be created, but instead it fails with an error:
You passed an empty string for 'tiers[0][up_to]'. We assume empty values are an attempt to unset a parameter; however 'tiers[0][up_to]' cannot be unset. You should remove 'tiers[0][up_to]' from your request or supply a non-empty value.
Describe the bug
On the stable branch we have enums like
UpTo
manually defined on the types crate, but that's not the case for next branch, and some autogenerated enums ends up serializing incorrectly.To Reproduce
Try to create a price with
up_to: CreatePriceTiersUpTo::Inf
on any tier.Expected behavior
The price should be created, but instead it fails with an error:
Code snippets
No response
OS
all
Rust version
1.74.0
Library version
next
API version
2024-04-10
Additional context
Taking as an example this enum:
Inf
variant is incorrectly serialized tonull
, instead of"inf"
, as explained here.The correct enum would be: