Skip to main content

getEntitySourceLocation()

Home > @backstage/catalog-model > getEntitySourceLocation

Returns the source code location of the Entity, to the extent that one exists.

Signature:

function getEntitySourceLocation(entity: Entity): {
type: string;
target: string;
};

Parameters

Parameter

Type

Description

entity

Entity

**Returns:**

{ type: string; target: string; }

Remarks

If the returned location type is of type 'url', the target should be readable at least using the UrlReader from @backstage/backend-common. If it is not of type 'url', the caller needs to have explicit handling of each location type or signal that it is not supported.