diff --git a/node-legacy/__tests__/services.test.ts b/node-legacy/__tests__/services.test.ts index eed0b1fc..5a183efd 100644 --- a/node-legacy/__tests__/services.test.ts +++ b/node-legacy/__tests__/services.test.ts @@ -52,6 +52,17 @@ test('gRPC article page service client is generated and matches the snapshot', ( Object { "ArticlePageServiceClient": [Function], "ArticlePageServiceService": Object { + "getArticleCompanions": Object { + "path": "/stroeer.page.article.v1.ArticlePageService/GetArticleCompanions", + "requestDeserialize": [Function], + "requestSerialize": [Function], + "requestStream": false, + "requestType": [Function], + "responseDeserialize": [Function], + "responseSerialize": [Function], + "responseStream": false, + "responseType": [Function], + }, "getArticlePage": Object { "path": "/stroeer.page.article.v1.ArticlePageService/GetArticlePage", "requestDeserialize": [Function], diff --git a/node/__tests__/services.test.ts b/node/__tests__/services.test.ts index eed0b1fc..5a183efd 100644 --- a/node/__tests__/services.test.ts +++ b/node/__tests__/services.test.ts @@ -52,6 +52,17 @@ test('gRPC article page service client is generated and matches the snapshot', ( Object { "ArticlePageServiceClient": [Function], "ArticlePageServiceService": Object { + "getArticleCompanions": Object { + "path": "/stroeer.page.article.v1.ArticlePageService/GetArticleCompanions", + "requestDeserialize": [Function], + "requestSerialize": [Function], + "requestStream": false, + "requestType": [Function], + "responseDeserialize": [Function], + "responseSerialize": [Function], + "responseStream": false, + "responseType": [Function], + }, "getArticlePage": Object { "path": "/stroeer.page.article.v1.ArticlePageService/GetArticlePage", "requestDeserialize": [Function], diff --git a/stroeer/page/article/v1/article_page.proto b/stroeer/page/article/v1/article_page.proto index 222b3cd4..d068b48e 100644 --- a/stroeer/page/article/v1/article_page.proto +++ b/stroeer/page/article/v1/article_page.proto @@ -23,8 +23,8 @@ message ArticlePage { // stage(s) for the bottom of article pages, mostly seo cases like A-Z Modules repeated stroeer.page.stage.v1.Stage stages = 3; - // companion items - repeated stroeer.page.stage.v1.Stage.Item companions = 4; + // deprecated companion items. field is getting replaced by a new method in the article page service due to performance issues. + repeated stroeer.page.stage.v1.Stage.Item companions = 4 [deprecated = true]; } // An editorial article, which is related to another article. diff --git a/stroeer/page/article/v1/article_page_service.proto b/stroeer/page/article/v1/article_page_service.proto index 2e440147..a8f51825 100644 --- a/stroeer/page/article/v1/article_page_service.proto +++ b/stroeer/page/article/v1/article_page_service.proto @@ -7,6 +7,7 @@ syntax = "proto3"; package stroeer.page.article.v1; import "stroeer/page/article/v1/article_page.proto"; +import "stroeer/page/stage/v1/stage.proto"; option go_package = "github.com/stroeer/go-tapir/page/article/v1;article"; option java_multiple_files = true; @@ -16,15 +17,17 @@ option java_package = "de.stroeer.page.article.v1"; * ```protobuf * service ArticlePageService { * rpc GetArticlePage (GetArticlePageRequest) returns (GetArticlePageResponse) {} + * rpc GetArticleCompanions (GetArticleCompanionsRequest) returns (GetArticleCompanionsResponse) {} * } *``` * # Description * - * turns the requested article with all render relevant data for the user and SEO bots. + * turns the requested article with editorial render relevant data for the user and SEO bots. * */ service ArticlePageService { rpc GetArticlePage (GetArticlePageRequest) returns (GetArticlePageResponse) {} + rpc GetArticleCompanions (GetArticleCompanionsRequest) returns (GetArticleCompanionsResponse) {} } /** @@ -59,6 +62,37 @@ message GetArticlePageResponse { stroeer.page.article.v1.ArticlePage article_page = 1; } +/** + * ## Request message to get companions for an article page. + * ```protobuf + * message GetArticleCompanionsRequest { + * # section path of the article, e.g. "/sport/fussball/" + * string section_path = 1; + * } + * ``` + */ +message GetArticleCompanionsRequest { + string section_path = 1; +} + +/** + * ## Response message for an companions request. + * + * Status codes: + * - `OK` + * + * ```protobuf + * message GetArticleCompanionsResponse { + * # List of companions as Stage.Items. + * repeated stroeer.page.stage.v1.Stage.Item companions = 1; + * } + * ``` + */ +message GetArticleCompanionsResponse { + // companions with current article teasers to allure seo users to make additional page impressions. + repeated stroeer.page.stage.v1.Stage.Item companions = 1; +} + /** * * # Status/Error scenario's