Files
flatbuffers/tests/arrays_test.schema.json
tira-misu 0f83367f57 JSON schema - tailing double quotes for maximum (#6452)
* Fix C/C++ Create<Type>Direct with sorted vectors

If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".

* Changes due to code review

* Improve code readability

* Add generate of JSON schema to string to lib

* option indent_step is supported

* Remove unused variables

* Fix break in test

* Fix style to be consistent with rest of the code

* Fix  double quotes for (u)int8 in json schema

* Fix reference file for JSON schema test

* Fix reference file for JSON schema test
2021-02-10 11:45:34 -08:00

74 lines
2.3 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_ArrayTable" : {
"type" : "object",
"properties" : {
"a" : {
"$ref" : "#/definitions/MyGame_Example_ArrayStruct"
}
},
"additionalProperties" : false
}
},
"$ref" : "#/definitions/MyGame_Example_ArrayTable"
}