private List<VespaConfigChangeAction> validateAddAttributeAspect() {
        return nextFields.attributes().stream().
                map(Attribute::getName).
                filter(attrName -> !currentFields.containsAttribute(attrName) &&
                                   currentDocType.containsField(attrName)).
                map(attrName -> new VespaRestartAction(id, new ChangeMessageBuilder(attrName).addChange("add attribute aspect").build())).
                collect(Collectors.toList());
    }
Validates the changes between the current and next set of attribute fields in a document database.

@author geirst
config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidator.java