mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 12:32:19 +00:00
Add support for fixed-size arrays (#5313)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
0d2cebccfe
commit
e635141d5b
60
tests/arrays_test.schema.json
Normal file
60
tests/arrays_test.schema.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"definitions": {
|
||||
"MyGame_Example_TestEnum" : {
|
||||
"type" : "string",
|
||||
"enum": ["A", "B", "C"]
|
||||
},
|
||||
"MyGame_Example_NestedStruct" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"a" : {
|
||||
"type" : "array", "items" : { "type" : "number" },
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
},
|
||||
"b" : {
|
||||
"$ref" : "#/definitions/MyGame_Example_TestEnum"
|
||||
},
|
||||
"c" : {
|
||||
"$ref" : "#/definitions/MyGame_Example_TestEnum",
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
},
|
||||
"additionalProperties" : false
|
||||
},
|
||||
"MyGame_Example_ArrayStruct" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"a" : {
|
||||
"type" : "number"
|
||||
},
|
||||
"b" : {
|
||||
"type" : "array", "items" : { "type" : "number" },
|
||||
"minItems": 15,
|
||||
"maxItems": 15
|
||||
},
|
||||
"c" : {
|
||||
"type" : "number"
|
||||
},
|
||||
"d" : {
|
||||
"type" : "array", "items" : { "$ref" : "#/definitions/MyGame_Example_NestedStruct" },
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
},
|
||||
"additionalProperties" : false
|
||||
},
|
||||
"MyGame_Example_ArrayTable" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"a" : {
|
||||
"$ref" : "#/definitions/MyGame_Example_ArrayStruct"
|
||||
}
|
||||
},
|
||||
"additionalProperties" : false
|
||||
}
|
||||
},
|
||||
"$ref" : "#/definitions/MyGame_Example_ArrayTable"
|
||||
}
|
||||
Reference in New Issue
Block a user