type uploadBatchBody struct {
Data struct {
CreativeID string `json:"creative_id"`
} `json:"data"`
}
Get get a parsing error, but no crash:
ERRO[0000] Can't parse the type of field in struct error="expr (&{%!s(token.Pos=369) %!s(*ast.FieldList=&{376 [0xc00016adc0] 436}) %!s(bool=false)}) not yet unsupported" field=Data
Potential solution
An anonymous struct could be handled like so:
// @openapi:schema
type SomeStruct struct {
Data struct {
ID string `json:"id"`
} `json:"data"`
}
Problem
With a type which contains an array of anonymous struct:
We get a segfault:
And if we just have the anonymous struct:
Get get a parsing error, but no crash:
Potential solution
An anonymous struct could be handled like so:
Outputs: