Skip to content

Commit

Permalink
feat(stencil): add support for search API
Browse files Browse the repository at this point in the history
- add RPC call `SearchSchemas`
- define messages `SearchSchemasRequest` and `SearchSchemasResponse`
  • Loading branch information
Ramey GIrdhar committed Jan 21, 2022
1 parent c9513e9 commit f6c1819
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions odpf/stencil/v1beta1/stencil.proto
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ service StencilService {
summary: "Delete specified version of the schema";
};
}

rpc SearchSchemas(SearchSchemasRequest) returns (SearchSchemasResponse) {
option (google.api.http) = {
get: "/v1beta1/namespaces/{namespace_id}/schemas/_search"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "schema";
summary: "Search all the schemas in a given namespace";
};
}
}

message Namespace {
Expand Down Expand Up @@ -295,3 +305,21 @@ message DeleteVersionRequest {
message DeleteVersionResponse {
string message = 1;
}

message SearchSchemasRequest {
string namespace_id = 1;
int32 version_id = 2;
string query = 3;
}

message SearchSchemasResponse {
string namepsace_id = 1;
repeated SearchHits hits = 2;
}

message SearchHits {
string schema = 1;
int32 version_id = 2;
repeated string fields = 3;
repeated string types = 4;
}

0 comments on commit f6c1819

Please sign in to comment.