Skip to main content

CatalogBuilder.replaceEntityPolicies()

Home > @backstage/plugin-catalog-backend > CatalogBuilder > replaceEntityPolicies

Sets what policies to use for validation of entities between the pre- processing and post-processing stages. All such policies must pass for the entity to be considered valid.

If what you want to do is to replace the rules for what format is allowed in various core entity fields (such as metadata.name), you may want to use instead.

This function replaces the default set of policies; use with care.

Signature:

replaceEntityPolicies(policies: EntityPolicy[]): CatalogBuilder;

Parameters

ParameterTypeDescription
policiesEntityPolicy[]One or more policies

Returns:

CatalogBuilder