in common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerToProtoGenerator.java [271:289]
private String findBaseType(String swaggerType, String swaggerFmt) {
String key = swaggerType + ":" + swaggerFmt;
return switch (key) {
case "boolean:null" -> "bool";
// there is no int8/int16 in protobuf
case "integer:null" -> "int64";
case "integer:int8", "integer:int16", "integer:int32" -> "int32";
case "integer:int64" -> "int64";
case "number:null" -> "double";
case "number:float" -> "float";
case "number:double" -> "double";
case "string:null" -> "string";
case "string:byte" -> "bytes"; // LocalDate
case "string:date", "string:date-time" -> // Date
"int64";
case "file:null" -> throw new IllegalStateException("not support swagger type: " + swaggerType);
default -> null;
};
}