mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-24 07:01:48 +00:00
idl_gen_json_schema Fix generation of arrays of enums (#6184)
* idl_gen_json_schema.cpp: Fixed generation of arrays of enums #6175 * Fixed failing unit tests * GenBaseType generate "integer". Fixes #6066 * Ran tests/generate_code. * Removed modern R"()" strings * changed std::to_string to NumToString
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"a" : {
|
||||
"type" : "array", "items" : { "type" : "number" },
|
||||
"type" : "array", "items" : {"type" : "integer", "minimum" : -2147483648, "maximum" : 2147483647},
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
},
|
||||
@@ -22,7 +22,7 @@
|
||||
"maxItems": 2
|
||||
},
|
||||
"d" : {
|
||||
"type" : "array", "items" : { "type" : "number" },
|
||||
"type" : "array", "items" : {"type" : "integer", "minimum" : -9223372036854775808, "maximum" : 9223372036854775807},
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
@@ -36,23 +36,23 @@
|
||||
"type" : "number"
|
||||
},
|
||||
"b" : {
|
||||
"type" : "array", "items" : { "type" : "number" },
|
||||
"type" : "array", "items" : {"type" : "integer", "minimum" : -2147483648, "maximum" : 2147483647},
|
||||
"minItems": 15,
|
||||
"maxItems": 15
|
||||
},
|
||||
"c" : {
|
||||
"type" : "number"
|
||||
"type" : "integer", "minimum" : -128, "maximum" : 127"
|
||||
},
|
||||
"d" : {
|
||||
"type" : "array", "items" : { "$ref" : "#/definitions/MyGame_Example_NestedStruct" },
|
||||
"$ref" : "#/definitions/MyGame_Example_NestedStruct",
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
},
|
||||
"e" : {
|
||||
"type" : "number"
|
||||
"type" : "integer", "minimum" : -2147483648, "maximum" : 2147483647
|
||||
},
|
||||
"f" : {
|
||||
"type" : "array", "items" : { "type" : "number" },
|
||||
"type" : "array", "items" : {"type" : "integer", "minimum" : -9223372036854775808, "maximum" : 9223372036854775807},
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user