Skip to content

Commit efc71a5

Browse files
authored
fix(compass): remove unnecessary fields and update docs (#135)
* fix(compass): remove unused query params in search api * feat(compass): remove unnecessary fields and update docs * fix(compass): fix description
1 parent f751007 commit efc71a5

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

odpf/compass/v1beta1/service.proto

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ service CompassService {
193193

194194
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
195195
summary: "Search for an asset";
196-
description: "API for querying documents. 'text' is fuzzy matched against all the available datasets, and matched results are returned. You can specify additional match criteria using 'filter.*' query parameters. You can specify each filter multiple times to specify a set of values for those filters. For instance, to specify two landscape 'vn' and 'th', the query could be `/search/?text=<text>&filter.environment=integration&filter.landscape=vn&filter.landscape=th`";
196+
description: "API for querying documents. 'text' is fuzzy matched against all the available datasets, and matched results are returned. You can specify additional match criteria using 'filter[.*]' query parameters. You can specify each filter multiple times to specify a set of values for those filters. For instance, to specify two landscape 'vn' and 'th', the query could be `/search/?text=<text>&filter[environment]=integration&filter[landscape]=vn&filter[landscape]=th`. As an alternative, this API also supports fuzzy filter match with 'query' query params. For instance, searching assets that has 'bigqu' term in its description `/search/?text=<text>&query[description]=bigqu`";
197197
tags: ["Search","Asset"];
198198
};
199199
};
@@ -205,6 +205,7 @@ service CompassService {
205205

206206
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
207207
summary: "Suggest an asset";
208+
description: "API for retreiving N number of asset names that similar with the `text`. By default, N = 5 for now and hardcoded in the code.";
208209
tags: ["Search","Asset"];
209210
};
210211
};
@@ -216,7 +217,7 @@ service CompassService {
216217

217218
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
218219
summary: "Get Lineage Graph";
219-
description: "Get lineage graph of an asset";
220+
description: "Returns the lineage graph. Each entry in the graph describes a (edge) directed relation of assets with source and destination using it's urn, type, and service.";
220221
tags: ["Lineage", "Asset"];
221222
};
222223
};
@@ -228,7 +229,7 @@ service CompassService {
228229

229230
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
230231
summary: "fetch all types";
231-
description: "used to fetch all types";
232+
description: "Fetch all types supported in Compass";
232233
tags: ["Type"];
233234
};
234235
};
@@ -378,7 +379,7 @@ service CompassService {
378379

379380
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
380381
summary: "Star an asset";
381-
description: "Mark an asset by me with a star";
382+
description: "Mark an asset with a star";
382383
tags: ["User","Star"];
383384
};
384385
}
@@ -646,23 +647,17 @@ message DeleteCommentResponse {}
646647
message SearchAssetsRequest {
647648
string text = 1 [(validate.rules).string.ignore_empty = true, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "text to search for (fuzzy)"}];
648649
string rankby = 2 [(validate.rules).string.ignore_empty = true, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "descendingly sort based on a numeric field in the record. the nested field is written with period separated field name. eg, \"rankby[data.profile.usage_count]\""}];
649-
string searchby = 3 [(validate.rules).string.ignore_empty = true, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "search on a specific records field. the nested field is written with period separated field name. eg, \"searchby[data.schema.columns.name]\""}];
650-
uint32 size = 4 [(validate.rules).uint32 = { gte: 0, ignore_empty: true }, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "number of results to return"}];
651-
map<string, string> filter = 5 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "filter result based on a (nested) field of the asset. the nested field is written with period separated field name. eg, \"filter[data.landscape]\""}];
652-
map<string, string> query = 6 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "query result based on a (nested) field of the asset. the nested field is written with period separated field name. eg, \"query[data.owner]\""}];
650+
uint32 size = 3 [(validate.rules).uint32 = { gte: 0, ignore_empty: true }, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "number of results to return"}];
651+
map<string, string> filter = 4 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "filter result based on a (nested) field of the asset. the nested field is written with period separated field name. eg, \"filter[data.landscape]\""}];
652+
map<string, string> query = 5 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "query result based on a (nested) field of the asset. the nested field is written with period separated field name. eg, \"query[data.owner]\""}];
653653
}
654654

655655
message SearchAssetsResponse {
656656
repeated Asset data = 1;
657657
}
658658

659659
message SuggestAssetsRequest {
660-
string text = 1 [(validate.rules).string.ignore_empty = true, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "text to search for (fuzzy)"}];
661-
string rankby = 2 [(validate.rules).string.ignore_empty = true, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "descendingly sort based on a numeric field in the record. the nested field is written with period separated field name. eg, \"rankby[data.profile.usage_count]\""}];
662-
string searchby = 3 [(validate.rules).string.ignore_empty = true, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "search on a specific records field. the nested field is written with period separated field name. eg, \"searchby[data.schema.columns.name]\""}];
663-
uint32 size = 4 [(validate.rules).uint32 = { gte: 0, ignore_empty: true }, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "number of results to return"}];
664-
map<string, string> filter = 5 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "filter result based on a (nested) field of the asset. the nested field is written with period separated field name. eg, \"filter[data.landscape]\""}];
665-
map<string, string> query = 6 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "query result based on a (nested) field of the asset. the nested field is written with period separated field name. eg, \"query[data.owner]\""}];
660+
string text = 1 [(validate.rules).string.ignore_empty = true, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "text to search for suggestions"}];
666661
}
667662

668663
message SuggestAssetsResponse {

0 commit comments

Comments
 (0)