From 84db0f7911a2c4803174794d0b83b242028219ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Zvon=C4=8Dek?= Date: Wed, 14 Jun 2023 08:50:42 +0200 Subject: [PATCH] Update extending the model docs with correct imports and add getProcessorName function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gabriel Zvonček --- docs/features/software-catalog/extending-the-model.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/features/software-catalog/extending-the-model.md b/docs/features/software-catalog/extending-the-model.md index c254d7d0b6..4520bf60ca 100644 --- a/docs/features/software-catalog/extending-the-model.md +++ b/docs/features/software-catalog/extending-the-model.md @@ -472,8 +472,9 @@ We also provide a high-level example of what a catalog process for a custom entity might look like: ```ts -import { CatalogProcessor, processingResult } from '@backstage/catalog-backend'; -import { entityKindSchemaValidator } from '@backstage/catalog-model'; +import { CatalogProcessor, CatalogProcessorEmit, processingResult } from '@backstage/plugin-catalog-node'; +import { LocationSpec } from '@backstage/plugin-catalog-common' +import { Entity, entityKindSchemaValidator } from '@backstage/catalog-model'; // For an example of the JSONSchema format and how to use $ref markers to the // base definitions, see: @@ -490,6 +491,11 @@ export class FoobarEntitiesProcessor implements CatalogProcessor { entityKindSchemaValidator(foobarEntityV1alpha1Schema), ]; + // Return processor name + getProcessorName(): string { + return 'FoobarEntitiesProcessor' + } + // validateEntityKind is responsible for signaling to the catalog processing // engine that this entity is valid and should therefore be submitted for // further processing.