Are these OpenAPI 3 paths ambiguous?
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- openapi
- Área
- api, documentation
Línea de trabajo
Lee la sección Paths Object en versions/3.0.0.md y compara sus reglas de coincidencia con los ejemplos /shops/{shopId}/pets/{petId} y /shops/{shopId}/pets/_search de este issue. Revisa la discusión existente antes de decidir si el texto necesita una definición o un ejemplo adicional. Se considera terminado cuando los maintainers están de acuerdo con una redacción aclaratoria de la especificación y se actualiza la sección correspondiente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
As suggested by @MikeRalphson on Stackoverflow, I'm asking the question here as well.
Are those OpenAPI 3 paths ambiguous?
/shops/{shopId}/pets/{petId}
/shops/{shopId}/pets/_search
I want to answer no but, strictly reading the spec, I can't decide because they seem to fall into none of the 3 statements made by the spec:
- Neither path is concrete (term used in the spec)
- Paths don't seem to meet the Templated paths with the same hierarchy but different templated names criteria (that is not very clear to me, here is my understanding:
"/shops/{}/pets/{}" != "/shops/{}/pets/_search") - Paths do not look like the ambiguous example
In addition to the question asked on Stackoverflow, let me ask two additional questions (below).
Should the OA3 spec be improved?
@MikeRalphson's reading of the spec: path are not ambiguous because one is more concrete than the other.
If paths are indeed not ambiguous, then the more concrete notion might need to be defined.
How could the OA3 spec be improved?
We might add an example like this:
Assuming paths sharing a common and identical prefix,
/shops/{shopId}/pets, the more concrete definition,/shops/{shopId}/pets/_search, will be matched first if used:/shops/{shopId}/pets/{petId} /shops/{shopId}/pets/_search
Or we might only show minimalistic examples involving templated names, and say that they also apply in case of common and identical prefixes:
First statement (concrete vs template case):
/{otherPlace} /here
Second statement (considered identical and invalid):
/{id} /{name}
Third statement is left unchanged (ambiguous resolution):
/{entity}/me /books/{id}
Related excerpt of the OA3 spec
The "Paths object" paragraph of the OpenAPI 3 specification (https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#paths-object) is stating (3 sentences, 3 statements):
When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use.
Those 3 statements are followed by 3 examples (and that's it):
Assuming the following paths, the concrete definition,
/pets/mine, will be matched first if used:/pets/{petId} /pets/mineThe following paths are considered identical and invalid:
/pets/{petId} /pets/{name}The following may lead to ambiguous resolution:
/{entity}/me /books/{id}
- Lenguaje dominante
- Markdown
- Estrellas
- 31.2k
- Forks
- 9.2k
- Merge medio
- 2 d 9 h
- PR fusionados (30 d)
- 17
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OAI/OpenAPI-Specification
-
Housekeeping
Dificultad 1/5 Menos de una hora Aptitud para principiantes 45/100
OAI/OpenAPI-Specification#5566 ·
Los mantenedores suelen responder en 1 día
-
Housekeeping
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
OAI/OpenAPI-Specification#5562 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Housekeeping
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
OAI/OpenAPI-Specification#5556 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
v3.2.1 releaseQuizá libre de nuevo @lornajane la tomó hace 30 días y no hay ningún pull request abierto. Abierto
OAI/OpenAPI-Specification#5460 · 11 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
param serialization
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
OAI/OpenAPI-Specification#5366 · 12 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de OAI/OpenAPI-Specification
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dusk-network/exu#17 ·
-
create-element: same editorAlias silent-fallback bug as #201, not covered by that fixPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertogenerated-by-ai
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
umbraco/Umbraco-CMS-MCP-Editor#208 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Claiming namespace `jft63`Abiertonamespace operations
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
EclipseFdn/open-vsx.org#14043 ·
Los mantenedores suelen responder en 1 día
-
bug: directory index route root priority is overwritten when wildcard is falsePosiblemente ocupada @TalhaHunter101 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
fastify/fastify-static#617 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apple/swift-nio-imap#862 ·