Files
flatbuffers-bigfoot/tests/arrays_test.schema.json
Renzo 292870612c fix(flatbuffers): use manual impl Default for struct object types (#8947)
* fix(flatbuffers): use manual impl Default for struct object types

* fix: handle bool and float zero literals in struct object Default impl

* fix: regenerate all test bindings with generate_code.py

* fix: data type check on swift build

* fix: test large array on struct and enum
2026-03-06 11:20:32 -08:00

105 lines
3.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"definitions": {
"MyGame_Example_TestEnum" : {
"type" : "string",
"enum": ["A", "B", "C"]
},
"MyGame_Example_NestedStruct" : {
"type" : "object",
"properties" : {
"a" : {
"type" : "array", "items" : {"type" : "integer", "minimum" : -2147483648, "maximum" : 2147483647},
"minItems": 2,
"maxItems": 2
},
"b" : {
"$ref" : "#/definitions/MyGame_Example_TestEnum"
},
"c" : {
"type" : "array", "items" : {"$ref" : "#/definitions/MyGame_Example_TestEnum"},
"minItems": 2,
"maxItems": 2
},
"d" : {
"type" : "array", "items" : {"type" : "integer", "minimum" : -9223372036854775808, "maximum" : 9223372036854775807},
"minItems": 2,
"maxItems": 2
}
},
"additionalProperties" : false
},
"MyGame_Example_ArrayStruct" : {
"type" : "object",
"properties" : {
"a" : {
"type" : "number"
},
"b" : {
"type" : "array", "items" : {"type" : "integer", "minimum" : -2147483648, "maximum" : 2147483647},
"minItems": 15,
"maxItems": 15
},
"c" : {
"type" : "integer", "minimum" : -128, "maximum" : 127
},
"d" : {
"type" : "array", "items" : {"$ref" : "#/definitions/MyGame_Example_NestedStruct"},
"minItems": 2,
"maxItems": 2
},
"e" : {
"type" : "integer", "minimum" : -2147483648, "maximum" : 2147483647
},
"f" : {
"type" : "array", "items" : {"type" : "integer", "minimum" : -9223372036854775808, "maximum" : 9223372036854775807},
"minItems": 2,
"maxItems": 2
}
},
"additionalProperties" : false
},
"MyGame_Example_LargeArrayStruct" : {
"type" : "object",
"properties" : {
"d" : {
"type" : "array", "items" : {"type" : "integer", "minimum" : 0, "maximum" :255},
"minItems": 64,
"maxItems": 64
},
"e" : {
"type" : "array", "items" : {"type" : "number"},
"minItems": 64,
"maxItems": 64
},
"f" : {
"type" : "array", "items" : {"type" : "boolean"},
"minItems": 64,
"maxItems": 64
},
"g" : {
"type" : "array", "items" : {"$ref" : "#/definitions/MyGame_Example_NestedStruct"},
"minItems": 64,
"maxItems": 64
},
"h" : {
"type" : "array", "items" : {"$ref" : "#/definitions/MyGame_Example_TestEnum"},
"minItems": 64,
"maxItems": 64
}
},
"additionalProperties" : false
},
"MyGame_Example_ArrayTable" : {
"type" : "object",
"properties" : {
"a" : {
"$ref" : "#/definitions/MyGame_Example_ArrayStruct"
}
},
"additionalProperties" : false
}
},
"$ref" : "#/definitions/MyGame_Example_ArrayTable"
}