Remove requirement that deprecated property 'target' is provided
The target property has been deprecated for a long time on an EntityRelation, but is still required in the spec. This fix removes that requirement, but keeps it around for now. Signed-off-by: Rickard Dybeck <dybeck@spotify.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-model': patch
|
||||
---
|
||||
|
||||
Remove requirement for 'target' property of EntityRelation
|
||||
@@ -32,7 +32,7 @@
|
||||
"$id": "#relation",
|
||||
"type": "object",
|
||||
"description": "A directed relation from one entity to another.",
|
||||
"required": ["type", "target", "targetRef"],
|
||||
"required": ["type", "targetRef"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"type": {
|
||||
|
||||
@@ -365,11 +365,6 @@ describe('entitySchemaValidator', () => {
|
||||
expect(() => validator(entity)).toThrow(/relations/);
|
||||
});
|
||||
|
||||
it('does reject missing relations.target', () => {
|
||||
delete entity.relations[0].target;
|
||||
expect(() => validator(entity)).toThrow(/relations/);
|
||||
});
|
||||
|
||||
it('does reject missing relations.targetRef', () => {
|
||||
delete entity.relations[0].targetRef;
|
||||
expect(() => validator(entity)).toThrow(/relations/);
|
||||
|
||||
Reference in New Issue
Block a user