googleapis / googleapis/google-cloud-cpp

generalize traversing message types for REST query parameters

オープン
#14,492 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
cpp: generator type: cleanup
主要言語
C++
スター
659
フォーク
462
平均マージ
1日 2時間
マージ済み PR(30日)
89

説明

For Requests that have query parameters nested in messages, we need to synthesize qualified names for those parameters and include them in the URL.

for this example, the URL should be something like:

```
"https://bigquery.googleapis.com/bigquery/v2/projects//queries/?maxResults=10&formatOptions.useInt6stamp=false"
```

```
// Options for data format adjustments.
message DataFormatOptions {
// Optional. Output timestamp as usec int64. Default is false.
bool use_int64_timestamp = 1 [(google.api.field_behavior) = OPTIONAL];
}

// Request object of GetQueryResults.
message GetQueryResultsRequest {
// Required. Project ID of the query job.
string project_id = 1 [(google.api.field_behavior) = REQUIRED];

// Required. Job ID of the query job.
string job_id = 2 [(google.api.field_behavior) = REQUIRED];

// Zero-based index of the starting row.
google.protobuf.UInt64Value start_index = 3;

// Page token, returned by a previous call, to request the next page of
// results.
string page_token = 4;

// Maximum number of results to read.
google.protobuf.UInt32Value max_results = 5;

// Optional: Specifies the maximum amount of time, in milliseconds, that the
// client is willing to wait for the query to complete. By default, this limit
// is 10 seconds (10,000 milliseconds). If the query is complete, the
// jobComplete field in the response is true. If the query has not yet
// completed, jobComplete is false.
//
// You can request a longer timeout period in the timeoutMs field. However,
// the call is not guaranteed to wait for the specified timeout; it typically
// returns after around 200 seconds (200,000 milliseconds), even if the query
// is not complete.
//
// If jobComplete is false, you can continue to wait for the query to complete
// by calling the getQueryResults method until the jobComplete field in the
// getQueryResults response is true.
google.protobuf.UInt32Value timeout_ms = 6;

// The geographic location of the job. You must specify the location to run
// the job for the following scenarios:
//
// * If the location to run a job is not in the `us` or
// the `eu` multi-regional location
// * If the job's location is in a single region (for example,
// `us-central1`)
//
// For more information, see
// https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
string location = 7;

// Optional. Output format adjustments.
DataFormatOptions format_options = 8 [(google.api.field_behavior) = OPTIONAL];
}

```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、C++クライアントライブラリ内でRESTリクエストのクエリパラメータを走査するエントリポイントを特定します。このissueではファイルもテストも指定されていません。ネストされた format_options.use_int64_timestamp を含む GetQueryResultsRequest の例を参照ケースとして使用します。既存のトップレベルパラメータに加えて、ネストされたメッセージのフィールドが修飾されたURLクエリパラメータとして出力されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
api
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。