-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
172 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#pragma once | ||
#include <ydb/public/api/grpc/ydb_topic_v1.grpc.pb.h> | ||
#include <ydb/core/grpc_services/rpc_calls_topic.h> | ||
#include "json_local_rpc.h" | ||
|
||
namespace NKikimr { | ||
namespace NViewer { | ||
|
||
using TJsonDescribeConsumer = TJsonLocalRpc<Ydb::Topic::DescribeConsumerRequest, | ||
Ydb::Topic::DescribeConsumerResponse, | ||
Ydb::Topic::DescribeConsumerResult, | ||
Ydb::Topic::V1::TopicService, | ||
NKikimr::NGRpcService::TEvDescribeConsumerRequest>; | ||
|
||
template<> | ||
YAML::Node TJsonRequestSwagger<TJsonDescribeConsumer>::GetSwagger() { | ||
YAML::Node node = YAML::Load(R"___( | ||
get: | ||
tags: | ||
- viewer | ||
summary: Topic schema detailed information | ||
description: Returns detailed information about topic | ||
parameters: | ||
- name: database | ||
in: query | ||
description: database name | ||
required: true | ||
type: string | ||
- name: consumer | ||
in: query | ||
description: consumer name | ||
required: true | ||
type: string | ||
- name: include_stats | ||
in: query | ||
description: include stat flag | ||
required: false | ||
type: bool | ||
- name: timeout | ||
in: query | ||
description: timeout in ms | ||
required: false | ||
type: integer | ||
- name: enums | ||
in: query | ||
description: convert enums to strings | ||
required: false | ||
type: boolean | ||
- name: ui64 | ||
in: query | ||
description: return ui64 as number | ||
required: false | ||
type: boolean | ||
responses: | ||
200: | ||
description: OK | ||
content: | ||
application/json: | ||
schema: {} | ||
400: | ||
description: Bad Request | ||
403: | ||
description: Forbidden | ||
504: | ||
description: Gateway Timeout | ||
)___"); | ||
node["get"]["responses"]["200"]["content"]["application/json"]["schema"] = TProtoToYaml::ProtoToYamlSchema<Ydb::Topic::DescribeConsumerResult>(); | ||
return node; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#pragma once | ||
#include <ydb/public/api/grpc/ydb_topic_v1.grpc.pb.h> | ||
#include <ydb/core/grpc_services/rpc_calls_topic.h> | ||
#include "json_local_rpc.h" | ||
|
||
namespace NKikimr { | ||
namespace NViewer { | ||
|
||
using TJsonDescribeTopic = TJsonLocalRpc<Ydb::Topic::DescribeTopicRequest, | ||
Ydb::Topic::DescribeTopicResponse, | ||
Ydb::Topic::DescribeTopicResult, | ||
Ydb::Topic::V1::TopicService, | ||
NKikimr::NGRpcService::TEvDescribeTopicRequest>; | ||
|
||
template<> | ||
YAML::Node TJsonRequestSwagger<TJsonDescribeTopic>::GetSwagger() { | ||
YAML::Node node = YAML::Load(R"___( | ||
get: | ||
tags: | ||
- viewer | ||
summary: Topic schema detailed information | ||
description: Returns detailed information about topic | ||
parameters: | ||
- name: database | ||
in: query | ||
description: database name | ||
required: true | ||
type: string | ||
- name: path | ||
in: query | ||
description: schema path | ||
required: true | ||
type: string | ||
- name: include_stats | ||
in: query | ||
description: include stat flag | ||
required: false | ||
type: bool | ||
- name: timeout | ||
in: query | ||
description: timeout in ms | ||
required: false | ||
type: integer | ||
- name: enums | ||
in: query | ||
description: convert enums to strings | ||
required: false | ||
type: boolean | ||
- name: ui64 | ||
in: query | ||
description: return ui64 as number | ||
required: false | ||
type: boolean | ||
responses: | ||
200: | ||
description: OK | ||
content: | ||
application/json: | ||
schema: {} | ||
400: | ||
description: Bad Request | ||
403: | ||
description: Forbidden | ||
504: | ||
description: Gateway Timeout | ||
)___"); | ||
node["get"]["responses"]["200"]["content"]["application/json"]["schema"] = TProtoToYaml::ProtoToYamlSchema<Ydb::Topic::DescribeTopicResult>(); | ||
return node; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters