How should enum arrays and flags expand in URL templates?
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 18/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 31
- Forks
- 48
- Merge médio
- 16h 36min
- PRs com merge (30d)
- 73
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microsoft/kiota-python
-
Backing store enumeration returns internal tracking tuples instead of stored listsTalvez já em andamento @pradeep-ramola assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
microsoft/kiota-python#938 ·
Mantenedores costumam responder em até 1 dia
-
JSON numeric getters accept booleans as integers and floatsTalvez já em andamento @pradeep-ramola assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
microsoft/kiota-python#935 ·
Mantenedores costumam responder em até 1 dia
-
ensure 304 response code does not throwTalvez livre de novo @nightcityblade assumiu há 92 dias e não há nenhum pull request aberto. Abertahelp wanted type:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/kiota-python#477 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
microsoft/kiota-python#901 ·
Mantenedores costumam responder em até 1 dia
-
type:breaking-change
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 12/100
microsoft/kiota-python#777 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de microsoft/kiota-python
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
hermes hooks doctor smoke test never checks the hook exit code — a crashing hook (exit=1) renders ✓ "ran clean" and "All shell hooks look healthy"Talvez já em andamento @cestercian assumiu hoje. Abertacomp/cli P2 type/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
NousResearch/hermes-agent#162259 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
AOSSIE-Org/PictoPy#1802 · 2 comentários ·
Mantenedores costumam responder em até 3 dias
-
community-request
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NVIDIA-NeMo/Run#727 ·
Mantenedores costumam responder em até 1 dia
-
bot-triaged module: higher order operators module: pickle module: pt2-dispatcher oncall: pt2 triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
pytorch/pytorch#207247 · 1 comentário ·
Mantenedores costumam responder em até 1 dia