fix(code-gen): hack to fix resolution of malformed number property
This commit is contained in:
parent
40b784cf57
commit
b069c7e493
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -2290,7 +2290,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "torn-api-codegen"
|
name = "torn-api-codegen"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck",
|
"heck",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "torn-api-codegen"
|
name = "torn-api-codegen"
|
||||||
authors = ["Pyrit [2111649]"]
|
authors = ["Pyrit [2111649]"]
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "Contains the v2 torn API model descriptions and codegen for the bindings"
|
description = "Contains the v2 torn API model descriptions and codegen for the bindings"
|
||||||
license-file = { workspace = true }
|
license-file = { workspace = true }
|
||||||
|
|
|
@ -206,7 +206,7 @@ impl Property {
|
||||||
let prim = match (schema.r#type, schema.format) {
|
let prim = match (schema.r#type, schema.format) {
|
||||||
(Some("integer"), Some("int32")) => PrimitiveType::I32,
|
(Some("integer"), Some("int32")) => PrimitiveType::I32,
|
||||||
(Some("integer"), Some("int64")) => PrimitiveType::I64,
|
(Some("integer"), Some("int64")) => PrimitiveType::I64,
|
||||||
(Some("number"), Some("float")) => PrimitiveType::Float,
|
(Some("number"), /* Some("float") */ _) => PrimitiveType::Float,
|
||||||
(Some("string"), None) => PrimitiveType::String,
|
(Some("string"), None) => PrimitiveType::String,
|
||||||
(Some("boolean"), None) => PrimitiveType::Bool,
|
(Some("boolean"), None) => PrimitiveType::Bool,
|
||||||
_ => return None,
|
_ => return None,
|
||||||
|
|
Loading…
Reference in a new issue