Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions ydb/core/viewer/json_nodelist.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ struct TJsonRequestSchema<TJsonNodeList> {
type: string
Port:
type: integer
required:
- Id
- Address
- Port
)___");
}
};
Expand Down
28 changes: 14 additions & 14 deletions ydb/core/viewer/json_pdisk_restart.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ YAML::Node TJsonRequestSwagger<TJsonPDiskRestart>::GetSwagger() {
post:
tags:
- pdisk
produces:
- application/json
summary: Restart PDisk
description: Restart PDisk on the specified node
parameters:
Expand All @@ -211,18 +209,20 @@ YAML::Node TJsonRequestSwagger<TJsonPDiskRestart>::GetSwagger() {
responses:
200:
description: OK
schema:
type: object
properties:
result:
type: boolean
description: was operation successful or not
error:
type: string
description: details about failed operation
forceRetryPossible:
type: boolean
description: if true, operation can be retried with force flag
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
description: was operation successful or not
error:
type: string
description: details about failed operation
forceRetryPossible:
type: boolean
description: if true, operation can be retried with force flag
400:
description: Bad Request
403:
Expand Down
3 changes: 1 addition & 2 deletions ydb/core/viewer/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ class TViewer : public TActorBootstrapped<TViewer>, public IViewer {
if (swagger.IsNull()) {
auto get = path["get"];
get["tags"].push_back(tag);
get["produces"].push_back("application/json");
if (auto summary = handler->GetRequestSummary()) {
get["summary"] = summary;
}
Expand All @@ -263,7 +262,7 @@ class TViewer : public TActorBootstrapped<TViewer>, public IViewer {
get["parameters"] = handler->GetRequestParameters();
auto responses = get["responses"];
auto response200 = responses["200"];
response200["schema"] = handler->GetResponseJsonSchema();
response200["content"]["application/json"]["schema"] = handler->GetResponseJsonSchema();
} else {
path = swagger;
}
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/viewer/yaml/yaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ YAML::Node TProtoToYaml::ProtoToYamlSchema(const ::google::protobuf::Descriptor*
auto property = properties[fieldDescriptor->name()];
if (fieldDescriptor->is_repeated()) {
property["type"] = "array";
property = property["items"];
property.reset(property["items"]);
}
if (fieldDescriptor->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
if (fieldDescriptor->message_type()->full_name() == google::protobuf::Timestamp::descriptor()->full_name()) {
Expand Down