diff --git a/types/schemas.go b/types/schemas.go index f724c997..5d2d7d67 100644 --- a/types/schemas.go +++ b/types/schemas.go @@ -170,7 +170,12 @@ func (s *Schemas) embed(schema *Schema) { newSchema.ResourceFields = map[string]Field{} for k, v := range target.ResourceFields { - newSchema.ResourceFields[k] = v + // We remove the dynamic fields off the existing schema in case + // they've been removed from the dynamic schema so they won't + // be accidentally left over + if !v.DynamicField { + newSchema.ResourceFields[k] = v + } } for k, v := range schema.ResourceFields { newSchema.ResourceFields[k] = v diff --git a/types/types.go b/types/types.go index 88dfad3e..4951c70b 100644 --- a/types/types.go +++ b/types/types.go @@ -136,6 +136,7 @@ type Field struct { InvalidChars string `json:"invalidChars,omitempty"` Description string `json:"description,omitempty"` CodeName string `json:"-"` + DynamicField bool `json:"dynamicField,omitempty"` } type Action struct {