Skip to content

Commit 8d86622

Browse files
authored
feat: Add GetSpecSchema to the plugin spec (#20)
1 parent cda10e1 commit 8d86622

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

plugin/v3/plugin.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ service Plugin {
1212
rpc GetName(GetName.Request) returns (GetName.Response);
1313
// Get the current version of the plugin
1414
rpc GetVersion(GetVersion.Request) returns (GetVersion.Response);
15+
// Get plugin spec schema.
16+
// This will allow validating the input even before calling Init.
17+
// Should be called before Init.
18+
rpc GetSpecSchema(GetSpecSchema.Request) returns (GetSpecSchema.Response);
1519
// Configure the plugin with the given credentials and mode
1620
rpc Init(Init.Request) returns (Init.Response);
1721
// Get all tables the source plugin supports. Must be called after Init
@@ -41,6 +45,15 @@ message GetVersion {
4145
}
4246
}
4347

48+
message GetSpecSchema {
49+
message Request {}
50+
message Response {
51+
// Should be a valid JSON schema for the plugin spec.
52+
// See https://json-schema.org for more details.
53+
optional string json_schema = 1;
54+
}
55+
}
56+
4457
message Init {
4558
message Request {
4659
bytes spec = 1; // Internal plugin-specific spec

0 commit comments

Comments
 (0)