Skip to main content

CatalogBuilder.addEntityPolicy()

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

Adds policies that are used to validate 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.

Signature:

addEntityPolicy(...policies: Array<EntityPolicy | Array<EntityPolicy>>): CatalogBuilder;

Parameters

Parameter

Type

Description

policies

Array<EntityPolicy | Array<EntityPolicy>>

One or more policies

**Returns:**

CatalogBuilder