You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/03/14 14:01:53 UTC
[incubator-apisix] branch master updated: bugfix: return the schema
of plugin grpc-transcode. (#1265)
This is an automated email from the ASF dual-hosted git repository.
membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 177892f bugfix: return the schema of plugin grpc-transcode. (#1265)
177892f is described below
commit 177892f1a429767042d1ca6697e975ef4cab7eab
Author: YuanSheng Wang <me...@gmail.com>
AuthorDate: Sat Mar 14 22:01:47 2020 +0800
bugfix: return the schema of plugin grpc-transcode. (#1265)
---
lua/apisix/plugins/grpc-transcode.lua | 2 +-
lua/apisix/schema_def.lua | 3 +++
t/admin/schema.t | 10 ++++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/lua/apisix/plugins/grpc-transcode.lua b/lua/apisix/plugins/grpc-transcode.lua
index daf4856..04a44c8 100644
--- a/lua/apisix/plugins/grpc-transcode.lua
+++ b/lua/apisix/plugins/grpc-transcode.lua
@@ -66,8 +66,8 @@ local schema = {
items = { type="string", anyOf = pb_option_def },
minItems = 1,
},
- additionalProperties = true,
},
+ additionalProperties = true,
required = { "proto_id", "service", "method" },
}
diff --git a/lua/apisix/schema_def.lua b/lua/apisix/schema_def.lua
index 7874882..50a783a 100644
--- a/lua/apisix/schema_def.lua
+++ b/lua/apisix/schema_def.lua
@@ -481,6 +481,9 @@ _M.stream_route = {
}
+_M.id_schema = id_schema
+
+
setmetatable(_M, {
__index = schema,
__newindex = function() error("no modification allowed") end,
diff --git a/t/admin/schema.t b/t/admin/schema.t
index de623d4..54ef58e 100644
--- a/t/admin/schema.t
+++ b/t/admin/schema.t
@@ -219,3 +219,13 @@ GET /apisix/admin/schema/plugins/udp-logger
qr/{"properties":/
--- no_error_log
[error]
+
+
+
+=== TEST 12: get plugin grpc-transcode schema
+--- request
+GET /apisix/admin/schema/plugins/grpc-transcode
+--- response_body eval
+qr/"proto_id".*additionalProperties/
+--- no_error_log
+[error]