stitch targetRef and backwards compat inject it on read

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-02-18 13:57:58 +01:00
parent 4cca190797
commit d0582b2d0f
64 changed files with 388 additions and 143 deletions
@@ -66,7 +66,8 @@ describe('DefaultApiExplorerPage', () => {
relations: [
{
type: RELATION_MEMBER_OF,
target: { namespace: 'default', kind: 'Group', name: 'tools' },
targetRef: 'group:default/tools',
target: { namespace: 'default', kind: 'group', name: 'tools' },
},
],
};
@@ -95,10 +95,11 @@ describe('<ConsumedApisCard />', () => {
relations: [
{
target: {
kind: 'API',
kind: 'api',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'api:my-namespace/target-name',
type: RELATION_CONSUMES_API,
},
],
@@ -95,10 +95,11 @@ describe('<HasApisCard />', () => {
relations: [
{
target: {
kind: 'API',
kind: 'api',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'api:my-namespace/target-name',
type: RELATION_HAS_PART,
},
],
@@ -95,10 +95,11 @@ describe('<ProvidedApisCard />', () => {
relations: [
{
target: {
kind: 'API',
kind: 'api',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'api:my-namespace/target-name',
type: RELATION_PROVIDES_API,
},
],
@@ -98,10 +98,11 @@ describe('<ConsumingComponentsCard />', () => {
relations: [
{
target: {
kind: 'Component',
kind: 'component',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'component:my-namespace/target-name',
type: RELATION_API_CONSUMED_BY,
},
],
@@ -98,10 +98,11 @@ describe('<ProvidingComponentsCard />', () => {
relations: [
{
target: {
kind: 'Component',
kind: 'component',
namespace: 'my-namespace',
name: 'target-name',
},
targetRef: 'component:my-namespace/target-name',
type: RELATION_API_PROVIDED_BY,
},
],