mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-26 04:42:39 +00:00
[Javascript] Fix syntax error for signed enum (#5503)
* wrap quotes to enum name map to prevent syntax errorn when enum value is negative * Add a test that covers signed enum case
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
d0e3870c0f
commit
4b870aca98
@@ -9,6 +9,10 @@
|
||||
"type" : "string",
|
||||
"enum": ["Red", "Green", "Blue"]
|
||||
},
|
||||
"MyGame_Example_Race" : {
|
||||
"type" : "string",
|
||||
"enum": ["None", "Human", "Dwarf", "Elf"]
|
||||
},
|
||||
"MyGame_Example_Any" : {
|
||||
"type" : "string",
|
||||
"enum": ["NONE", "Monster", "TestSimpleTableWithEnum", "MyGame_Example2_Monster"]
|
||||
@@ -288,6 +292,9 @@
|
||||
},
|
||||
"vector_of_enums" : {
|
||||
"$ref" : "#/definitions/MyGame_Example_Color"
|
||||
},
|
||||
"signed_enum" : {
|
||||
"$ref" : "#/definitions/MyGame_Example_Race"
|
||||
}
|
||||
},
|
||||
"required" : ["name"],
|
||||
|
||||
Reference in New Issue
Block a user