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

feat: add service definition for the ArticleExtender for initial questions #612

Merged
merged 6 commits into from
Dec 13, 2024
Merged
Changes from 5 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
43 changes: 43 additions & 0 deletions stroeer/page/article/v1/extender_service.proto
harryherbig marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
syntax = "proto3";
/**
* @FileArticle ⚙︎ ArticleExtenderService
*/

package stroeer.page.article.v1;

option go_package = "github.com/stroeer/go-tapir/page/article/v1;article";

/**
* The ArticleExtenderService provides methods to extend an article with additional information.
* The main purpose is to retrieve questions for a given article to be rendered in the ArticleExtender Widget on ArticlePages.
*
* @CodeBlockStart protobuf
*/
service ArticleExtenderService {
rpc GetQuestions(GetQuestionsRequest) returns (GetQuestionsResponse) {}
}
/** @CodeBlockEnd */

/**
* # `⚙︎ GetQuestions`
* ```protobuf
* rpc GetQuestions(GetQuestionsRequest) returns (GetQuestionsResponse) {}
* ```
*
* returns an array of questions if the given `id` exists, in the vector store,
* an `Error`, otherwise.
*
* | Field name | Type | Description |
* |------------------|---------------------|-----------------------------------------------------------------------|
* | `id` | `int64` | [required] Unique id of the article, questions should be returned for.|
*
* @CodeBlockStart protobuf
*/

message GetQuestionsRequest {
int64 id = 1;
}

message GetQuestionsResponse {
repeated string questions = 1;
}
Loading