Skip to content

Commit 4925c20

Browse files
adameatdcherednik
authored andcommitted
Viewer updates stable 24-3 v3 (#10745)
1 parent 7af34ac commit 4925c20

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

ydb/core/viewer/json/json.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,7 @@ void TProtoToJson::ProtoToJsonSchema(IOutputStream& to, const TJsonSettings& jso
492492
to << "{\"type\":\"array\",\"items\":";
493493
}
494494
if (fieldDescriptor->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
495-
if (fieldDescriptor->message_type()->full_name() == google::protobuf::Timestamp::descriptor()->full_name()) {
496-
to << "{\"type\":\"string\",\"format\":\"date-time\"}";
497-
} else if (fieldDescriptor->message_type()->full_name() == google::protobuf::Duration::descriptor()->full_name()) {
495+
if (fieldDescriptor->message_type()->full_name() == google::protobuf::Duration::descriptor()->full_name()) {
498496
to << "{\"type\":\"string\", \"example\":\"3600s\"}";
499497
} else if (fieldDescriptor->message_type()->full_name() == google::protobuf::BoolValue::descriptor()->full_name()) {
500498
to << "{\"type\":\"boolean\"}";

ydb/core/viewer/yaml/yaml.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ YAML::Node TProtoToYaml::ProtoToYamlSchema(const ::google::protobuf::Descriptor*
6060
property.reset(property["items"]);
6161
}
6262
if (fieldDescriptor->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
63-
if (fieldDescriptor->message_type()->full_name() == google::protobuf::Timestamp::descriptor()->full_name()) {
64-
property["type"] = "string";
65-
property["format"] = "date-time";
66-
} else if (fieldDescriptor->message_type()->full_name() == google::protobuf::Duration::descriptor()->full_name()) {
63+
if (fieldDescriptor->message_type()->full_name() == google::protobuf::Duration::descriptor()->full_name()) {
6764
property["type"] = "string";
6865
property["example"] = "3600s";
6966
} else if (fieldDescriptor->message_type()->full_name() == google::protobuf::BoolValue::descriptor()->full_name()) {

0 commit comments

Comments
 (0)