diff --git a/src/idl_gen_json_schema.cpp b/src/idl_gen_json_schema.cpp index e24d6ce12..2962d4194 100644 --- a/src/idl_gen_json_schema.cpp +++ b/src/idl_gen_json_schema.cpp @@ -87,8 +87,9 @@ static std::string GenType(BaseType type) { return "\"type\" : \"integer\", \"minimum\" : 0, \"maximum\" : " + NumToString(std::numeric_limits::max()); case BASE_TYPE_FLOAT: + return "\"type\" : \"number\", \"format\" : \"float\""; case BASE_TYPE_DOUBLE: - return "\"type\" : \"number\""; + return "\"type\" : \"number\", \"format\" : \"double\""; case BASE_TYPE_STRING: return "\"type\" : \"string\""; default: