Ordering of matches when no path is concrete
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Documentazione
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- openapi
- Ambito
- api, documentation
Direzione di ricerca
Inizia con la sezione «Patterned Fields» collegata di OpenAPI 3.0.3 e con la discussione in OpenAPI Specification issue #1459. Confronta le relative indicazioni con l’esempio di templated path presente in questa issue e determina se esiste una regola normativa sull’ordinamento. L’attività è completata quando l’ambiguità è risolta da una regola documentata o da una dichiarazione chiara che la specifica non ne definisce alcuna.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- Markdown
- Stelle
- 31.2k
- Fork
- 9.2k
- Merge medio
- 2g 9h
- PR unite (30g)
- 17
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OAI/OpenAPI-Specification
-
Housekeeping
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 45/100
OAI/OpenAPI-Specification#5566 ·
I maintainer di solito rispondono entro 1 giorno
-
Housekeeping
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
OAI/OpenAPI-Specification#5562 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Housekeeping
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
OAI/OpenAPI-Specification#5556 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
v3.2.1 releaseForse di nuovo libera @lornajane l’ha presa 31 giorni fa e non c’è nessuna pull request aperta. Aperta
OAI/OpenAPI-Specification#5460 · 11 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
param serialization
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
OAI/OpenAPI-Specification#5366 · 12 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OAI/OpenAPI-Specification
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
[BUG] Re-subscribing the Mono returned by listTools/listResources/listResourceTemplates/listPrompts/listRoots duplicates the resultsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelcontextprotocol/java-sdk#1174 · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NanmiCoder/cc-haha#1533 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Remove song from playlistAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
maxrave-dev/SimpMusic#2649 ·
I maintainer di solito rispondono entro 2 giorni
-
product/backlog
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TencentBlueKing/bk-nodemgr#3645 ·
I maintainer di solito rispondono entro 1 giorno