generator: panic when parameter is repeated Any portrayed as "type: object" #2379
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
An API with RPC request message
google.protobuf.HttpBody
without a(google.api.http).body
set will end up with itsrepeated google.protobuf.Any extensions
field portrayed in Discovery as atype: array
with itemstype: object
andadditionalProperties
containingtype: any
. ThesimpleTypeConvert
function isn't handlingtype: object
case so it returns!ok
and the resulting usagepanic
s, but it would've handledtype: any
had theadditionalProperties
been consulted for that field.Without considering a change to the Discovery document (which we should probably consult the Discovery generation owner about), our options include:
type: object
insimpleTypeConvert
, potentially in the same way asany
, using aninterface{}
additionalProperties
for potential atype
fieldSee this internal post for my detailed debugging process.
The text was updated successfully, but these errors were encountered: