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: added service for navigation rpc #505

Merged
merged 2 commits into from
May 11, 2023
Merged

feat: added service for navigation rpc #505

merged 2 commits into from
May 11, 2023

Conversation

moritzzimmer
Copy link
Member

@moritzzimmer moritzzimmer commented May 10, 2023

what

  1. provide new rpc to retrieve t-online navigation as a tree structure
  2. bumped java version to 17

why

align navigation data in our products

example

{
  "navigation_menu": {
    "children": [
      {
        "children": [
          {
            "children": [],
            "fields": {},
            "type": "",
            "label": "Deutschland",
            "href": "/nachrichten/deutschland/"
          },
          {
            "children": [],
            "fields": {},
            "type": "",
            "label": "Ausland",
            "href": "/nachrichten/ausland/"
          },
          {
            "children": [],
            "fields": {},
            "type": "",
            "label": "Corona-Krise",
            "href": "/nachrichten/corona-krise/"
          },
          {
            "children": [],
            "fields": {},
            "type": "",
            "label": "Tagesanbruch",
            "href": "/nachrichten/tagesanbruch/"
          }
        ],
        "fields": {},
        "type": "",
        "label": "Politik",
        "href": "/nachrichten/"
      },
      {
        "children": [],
        "fields": {},
        "type": "",
        "label": "Ukraine",
        "href": "/nachrichten/ukraine/"
      }
    ],
    "fields": {},
    "type": "",
    "label": "navigation_menu",
    "href": "/"
  }
}

@@ -0,0 +1,28 @@
syntax = "proto3";

package stroeer.navigation.v1;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idea: use a new package instead of fragement to make major versions bumps/dependencies easier in the future....

@moritzzimmer moritzzimmer self-assigned this May 10, 2023
@bobaaaaa bobaaaaa added the 🎁 API API/Model changes label May 10, 2023
@moritzzimmer moritzzimmer added the 📔 RFC Request for comments label May 10, 2023
bobaaaaa
bobaaaaa previously approved these changes May 10, 2023

service NavigationService {
// Retrieve navigation tree structure
rpc GetNavigation(GetNavigationRequest) returns (GetNavigationResponse) {}
Copy link
Member

@thisismana thisismana May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rpc GetNavigation(google.protobuf.Empty) returns (GetNavigationResponse) {}

and then add a message later if required?

see https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty and https://stackoverflow.com/a/51426142/12016

already been used in: core_article_service.proto

A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for Empty is empty JSON object {}.

@moritzzimmer moritzzimmer merged commit ee42eaa into main May 11, 2023
@moritzzimmer moritzzimmer deleted the feat/menu_api branch May 11, 2023 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 API API/Model changes 📔 RFC Request for comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants