From f8c3a770620e90da60c8b5bbfe0f9087f56decdb Mon Sep 17 00:00:00 2001 From: Dominik Henneke Date: Fri, 14 Aug 2020 14:05:30 +0200 Subject: [PATCH] fix(catalog): read correct property name implementsApis --- packages/catalog-model/examples/petstore-component.yaml | 2 +- .../catalog/src/components/EntityPageApi/EntityPageApi.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/catalog-model/examples/petstore-component.yaml b/packages/catalog-model/examples/petstore-component.yaml index 5cf0d1f270..7e2093ad09 100644 --- a/packages/catalog-model/examples/petstore-component.yaml +++ b/packages/catalog-model/examples/petstore-component.yaml @@ -7,7 +7,7 @@ spec: type: service lifecycle: experimental owner: pets@example.com - implementedApis: + implementsApis: - petstore - streetlights - hello-world diff --git a/plugins/catalog/src/components/EntityPageApi/EntityPageApi.tsx b/plugins/catalog/src/components/EntityPageApi/EntityPageApi.tsx index b115539366..5c0ff5485b 100644 --- a/plugins/catalog/src/components/EntityPageApi/EntityPageApi.tsx +++ b/plugins/catalog/src/components/EntityPageApi/EntityPageApi.tsx @@ -28,7 +28,7 @@ export const EntityPageApi: FC<{ entity: Entity }> = ({ entity }) => { const { value: apiEntities, loading } = useAsync(async () => { const a = await Promise.all( - ((entity?.spec?.implementedApis as string[]) || []).map(api => + ((entity?.spec?.implementsApis as string[]) || []).map(api => catalogApi.getEntityByName({ kind: 'API', name: api, @@ -48,7 +48,7 @@ export const EntityPageApi: FC<{ entity: Entity }> = ({ entity }) => { {loading && } {!loading && ( - {((entity?.spec?.implementedApis as string[]) || []).map(api => { + {((entity?.spec?.implementsApis as string[]) || []).map(api => { const apiEntity = apiEntities && apiEntities.get(api); return (