Ordering of matches when no path is concrete
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Documentação
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Stack de tecnologia
- openapi
- Domínio
- api, documentation
Direção de pesquisa
Comece pela seção vinculada «Patterned Fields» do OpenAPI 3.0.3 e pela discussão em OpenAPI Specification issue #1459. Compare as orientações delas com o exemplo de templated path nesta issue e determine se existe uma regra normativa de ordenação. O trabalho estará concluído quando a ambiguidade for resolvida por meio de uma regra documentada ou de uma declaração clara de que a especificação não define uma regra desse tipo.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
I'm a contributor for an OpenAPI Validator project, and one of our users has raised an issue that their the spec is not matching in the order they would expect (you can see the issue here).
The issue effectively boils down to the user expecting a path with just one templated segment to be matched over a path with more than one templated segment, i.e.:
/{id1}/{id2}/{id3}
/resource/{id}/new <- Expect this one to be picked
With a request path like: /resource/1/new.
Currently we are matching simply based on the order of the paths as defined by the user in their specification file (which is probably not the correct approach). My question is whether it is specified anywhere how to resolve/match multiple templated matches?
Looking at the relevant part of the OpenAPI3 spec, while it discusses preferring a concrete path over a path which uses templates, from the spec I couldn't see how paths would be chosen if both match the request, and both use templates in the path. Since the examples in the spec are fairly short, I wasn't sure if the above example would fall into the ambiguous category or not.
I did manage to find a discussion in your issues here which hints at the fact most people would match a path with more concrete segments, over one with less. Since we are a validation tool, I would prefer to be able to apply concrete rules.
Do you have any advice/further reading on matching paths like the above example?
- Linguagem predominante
- Markdown
- Estrelas
- 31.2k
- Forks
- 9.2k
- Merge médio
- 2d 9h
- PRs com merge (30d)
- 17
Preparar o ambiente
- 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 OAI/OpenAPI-Specification
-
Housekeeping
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 45/100
OAI/OpenAPI-Specification#5566 ·
Mantenedores costumam responder em até 1 dia
-
Housekeeping
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 35/100
OAI/OpenAPI-Specification#5562 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
Housekeeping
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 10/100
OAI/OpenAPI-Specification#5556 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
v3.2.1 releaseTalvez livre de novo @lornajane assumiu há 31 dias e não há nenhum pull request aberto. Aberta
OAI/OpenAPI-Specification#5460 · 11 comentários · 1 reação · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
param serialization
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
OAI/OpenAPI-Specification#5366 · 12 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de OAI/OpenAPI-Specification
Issues semelhantes
-
area:deploy task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
wilanis/wilanis-js#1017 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
eclipse-opensovd/classic-diagnostic-adapter#616 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
nixos/hyprland: wrapper source is a bash script and fails the ensure-wrapper-integrity ELF checkAberta0.kind: bug 6.topic: nixos
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
vllm-project/vllm#61131 ·
Mantenedores costumam responder em até 1 dia