grpc-ecosystem/grpc-gateway

Investigate whether HTTPRule parser allows invalid templates

開放

#2,833 建立於 2022年8月3日

 (3 則留言) (0 個反應) (0 位負責人)Go (2,250 個分叉)batch import
bughelp wantedquestion

倉庫指標

星標
 (16,971 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南