Codegen: Add support for optional maps (#60883)
This commit is contained in:
@@ -220,7 +220,7 @@ func DecoderCompactor() dstutil.ApplyFunc {
|
||||
c.Delete()
|
||||
}
|
||||
case *dst.Field:
|
||||
if id, is := x.Type.(*dst.Ident); is {
|
||||
if id, is := ddepoint(x.Type).(*dst.Ident); is {
|
||||
if expr, has := replace[id.Name]; has {
|
||||
x.Type = expr
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ type Permission int
|
||||
// Team defines model for team.
|
||||
type Team struct {
|
||||
// AccessControl metadata associated with a given resource.
|
||||
AccessControl map[string]bool `json:"accessControl"`
|
||||
AccessControl map[string]bool `json:"accessControl,omitempty"`
|
||||
|
||||
// AvatarUrl is the team's avatar URL.
|
||||
AvatarUrl *string `json:"avatarUrl,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user