mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
idl_gen_json_schema.cpp: Fixed detection of enum types (#4438)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
cc25516d3e
commit
77b22aed5a
@@ -69,7 +69,7 @@ std::string GenType(const std::string &name) {
|
||||
}
|
||||
|
||||
std::string GenType(const Type &type) {
|
||||
if (type.base_type == BASE_TYPE_CHAR && type.enum_def != nullptr) {
|
||||
if (type.enum_def != nullptr && !type.enum_def->is_union) {
|
||||
// it is a reference to an enum type
|
||||
return GenTypeRef(type.enum_def);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user