stringifyEntityRef()
Home > @backstage/catalog-model
> stringifyEntityRef
Takes an entity or entity name/reference, and returns the string form of an entity ref.
Signature:
function stringifyEntityRef(ref: Entity | {
kind: string;
namespace?: string;
name: string;
}): string;
Parameters
Parameter |
Type |
Description |
---|---|---|
ref |
Entity | { kind: string; namespace?: string; name: string; } |
The reference to serialize |
string
The same reference on either string or compound form
Remarks
This function creates a canonical and unique reference to the entity, converting all parts of the name to lowercase and inserts the default namespace if needed. It is typically not the best way to represent the entity reference to the user.