From 3fa037ad18b439cff1c66b790ed4e4b545a47b28 Mon Sep 17 00:00:00 2001 From: Nikita Nek Dudnik Date: Thu, 28 May 2020 13:42:49 +0200 Subject: [PATCH] feature: add description field to Component --- plugins/catalog/src/api/types.ts | 7 +++++++ plugins/catalog/src/data/utils.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/catalog/src/api/types.ts b/plugins/catalog/src/api/types.ts index 8ed5748e7c..4097b76098 100644 --- a/plugins/catalog/src/api/types.ts +++ b/plugins/catalog/src/api/types.ts @@ -69,6 +69,13 @@ export type EntityMeta = { */ name: string; + /** + * The short description of the entity. + * + * A a human readable string. + */ + description: string; + /** * The namespace that the entity belongs to. */ diff --git a/plugins/catalog/src/data/utils.ts b/plugins/catalog/src/data/utils.ts index b30ac61d9e..39a84cfbca 100644 --- a/plugins/catalog/src/data/utils.ts +++ b/plugins/catalog/src/data/utils.ts @@ -20,6 +20,6 @@ export function envelopeToComponent(envelope: DescriptorEnvelope): Component { return { name: envelope.metadata?.name ?? '', kind: envelope.kind ?? 'unknown', - description: 'placeholder', + description: envelope.metadata?.description ?? 'placeholder', }; }