feat(codegen): various improvements to robustness
This commit is contained in:
parent
a90bcb00c4
commit
cf98d24090
7 changed files with 344 additions and 96 deletions
|
|
@ -77,6 +77,11 @@ impl EnumVariantTupleValue {
|
|||
format: Some("int32"),
|
||||
..
|
||||
} => Some(Self::Primitive(PrimitiveType::I32)),
|
||||
OpenApiType {
|
||||
r#type: Some("number"),
|
||||
format: Some("float") | None,
|
||||
..
|
||||
} => Some(Self::Primitive(PrimitiveType::Float)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
@ -146,6 +151,7 @@ impl EnumVariantTupleValue {
|
|||
|
||||
pub fn is_comparable(&self, resolved: &ResolvedSchema) -> bool {
|
||||
match self {
|
||||
Self::Primitive(PrimitiveType::Float) => false,
|
||||
Self::Primitive(_) => true,
|
||||
Self::Enum { inner, .. } => inner.is_comparable(resolved),
|
||||
Self::Ref { ty_name } | Self::ArrayOfRefs { ty_name } => resolved
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue