[Feature Request] Support validation of extension fields
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
調査の方向性
まず、Go、Java、Python、C++ の実装で evaluator がどのように作成され、キャッシュされるかを追跡し、次に extension FieldDescriptors と既知のメッセージ型がどのように提供されるかを調べます。完了条件は、ネストされたメッセージ値を含め、存在する extension が再帰的に検証され、API が non-lazy のケースをサポートすることです。この issue ではファイルもテストも指定されていません。
索引モデルが issue の本文から書いたものです。
説明
Currently, all four implementations (Go, Java, Python, and C++) ignore extension fields.
Ideally, when building the evaluator for a message, if a message is extendable (its descriptor defines at least one extension range), an additional message-level evaluator would be instantiated whose implementation loops through all present extensions and recursively validates them. Not only should this apply field constraints to the extension fields, but it should also recursively validate nested messages, for extensions whose type is a message (or a list of messages or a map with message values).
Currently, evaluators are created and cached on a per-message basis. Computing an evaluator for a message constructs sub-evaluators for all fields and oneofs. We will need to either augment this to support to creating/caching evaluators keyed by an extension FieldDescriptor or the message evaluator needs to be mutable (at least when "lazy-loading" of evaluators is enabled), so that add'l extension field evaluators can be added as new extensions are encountered when validating message instances.
In order to properly support non-lazy validators, where all constraints must be defined up front, the APIs should be updated to accept extension FieldDescriptors up-front, in addition to accepting the set of known message types up-front. That way, rules can be built ahead-of-time for these extension fields and applied to the relevant messages.
- 主要言語
- Go
- スター
- 1.6k
- フォーク
- 68
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bufbuild/protovalidate のほかの issue
-
Feature
難易度 2/5 1〜3時間 初心者へのやさしさ 50/100
bufbuild/protovalidate#538 ·
-
[BUG] Hostname rule rejects a 253-character name with a trailing dot, which the docs say is validオープン
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
bufbuild/protovalidate#512 · コメント 2 件 ·
-
Feature
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
bufbuild/protovalidate#490 · コメント 1 件 ·
-
Feature
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
bufbuild/protovalidate#486 · コメント 11 件 ·
-
Feature
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
bufbuild/protovalidate#485 ·
bufbuild/protovalidate の issue をすべて見る
似ている issue
-
automation models
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
QuantumNous/new-api#7930 ·
メンテナーはふだん 1 日以内に返信
-
area/gateway kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
vllm-project/aibrix#3226 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug kind/flake
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
kubernetes-sigs/kueue#17518 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信