How should enum arrays and flags expand in URL templates?
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
The behaviour lives in RequestInformation query and path expansion in kiota_abstractions/request_information.py, with the enum handling introduced in #223 and kept in #883. Reproduce the four printed URLs from the issue before touching anything. Done would mean the maintainers have stated whether an enum list is an array or a flags value, and any change keeps the non-exploded %2C separator for flags.
索引モデルが issue の本文から書いたものです。
説明
I'd like to clarify the enum-collection contract before proposing a change to request URL construction.
On current main 17b952f81ea2a4d46bb44b6fe6b253578a0cf481, these public calls produce different URLs:
from enum import Enum
from kiota_abstractions.method import Method
from kiota_abstractions.request_information import RequestInformation
class Colour(Enum):
RED = "red"
BLUE = "blue"
for values in (["red", "blue"], [Colour.RED, Colour.BLUE]):
request = RequestInformation(Method.GET, "https://example.com/items{?colour*}")
request.query_parameters["colour"] = values
print(request.url)
https://example.com/items?colour=red&colour=blue
https://example.com/items?colour=red%2Cblue
Likewise, {/colour*} produces separate segments for the string list but one comma-joined segment for the enum list. I ran these locally on Windows/CPython 3.13.7; no service call is involved.
For a true array, repeated keys/segments match RFC6570. However, enum joining was introduced in #223 and deliberately preserved in #883, and enum lists can be used as a scalar representation in the form writer. I don't want to remove a flags convention while fixing array expansion.
Could you confirm whether generated query/path enum lists always represent array parameters, or whether they can also represent a single flags enum? If both forms exist, what should distinguish them at URI-template expansion time?
A local proposal that retains the collection makes the array examples work, but also changes non-exploded list separators from %2C to literal commas and normalizes boolean-valued enum elements differently. I'm keeping that runtime change unpublished until the intended contract is clear.
- 主要言語
- Python
- スター
- 31
- フォーク
- 48
- 平均マージ
- 16時間 36分
- マージ済み PR(30日)
- 73
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/kiota-python のほかの issue
-
Backing store enumeration returns internal tracking tuples instead of stored lists対応中かも @pradeep-ramola が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microsoft/kiota-python#938 ·
メンテナーはふだん 1 日以内に返信
-
JSON numeric getters accept booleans as integers and floats対応中かも @pradeep-ramola が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/kiota-python#935 ·
メンテナーはふだん 1 日以内に返信
-
ensure 304 response code does not throw再び着手できるかも @nightcityblade が 92 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンhelp wanted type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/kiota-python#477 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
microsoft/kiota-python#901 ·
メンテナーはふだん 1 日以内に返信
-
type:breaking-change
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
microsoft/kiota-python#777 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/kiota-python の issue をすべて見る
似ている issue
-
backend: claude chore dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
briandconnelly/amicus#606 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
semantica-agi/semantica#2320 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
vllm-project/vllm-omni#11465 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
jxxghp/MoviePilot#7699 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vllm-project/vllm-ascend#24010 ·
メンテナーはふだん 1 日以内に返信