Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate companions field in ArticlePage and add new method GetArticleCompanions #344

Merged
merged 5 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stroeer/page/article/v1/article_page.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
36 changes: 35 additions & 1 deletion stroeer/page/article/v1/article_page_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {}
}

/**
Expand Down Expand Up @@ -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
Expand Down