What If Utility#

WhatIfValidator([type_defs, existing_entities])

Provides a simple way to validate that your entities will successfully upload.

The WhatIfValidator provides utility functions to validate or check what if a provided upload were executed.

WhatIfValidator.entity_type_exists(entity)

Validate that the entity’s type is an actual entity definition.

WhatIfValidator.entity_missing_attributes(entity)

Check if the entity is missing required attributes.

WhatIfValidator.entity_has_invalid_attributes(entity)

Check if the entity is using attributes that are not defined on the type.

WhatIfValidator.entity_would_overwrite(entity)

Based on the qualified name attributes, does the provided entity exist in the entities provided to the What If Validator?

WhatIfValidator.validate_entities(entities)

Provide a report of invalid entities.