grpc-ecosystem/grpc-gateway

Investigate whether HTTPRule parser allows invalid templates

Open

#2.833 aberto em 3 de ago. de 2022

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Go (2.250 forks)batch import
bughelp wantedquestion

Métricas do repositório

Stars
 (16.971 stars)
Métricas de merge de PR
 (Mesclagem média 1d 4h) (141 fundiu PRs em 30d)

Description

As part of #2825, @oyvindwe mentioned that the HTTPRule parser may allow templates that will cause the OpenAPIv2 generator to generate invalid paths. Specifically:

Does the HttpRule parser also allow other path templates outside the specification? Specifically : before a variable? The reason I am asking is that the the joining of the path in the generator assumes that only the last part can start with :.

We should investigate whether this is the case, and if so, probably patch the openapiv2 generator to remove this assumption, as introducing errors for these templates now is a backwards incompatible change.

Related to #2824.

Guia do colaborador