Update based on PR comments - leave target as required while still in schema
Signed-off-by: Malikah Montgomery <malikah.montgomery@thoughtworks.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
"$id": "#relation",
|
||||
"type": "object",
|
||||
"description": "A directed relation from one entity to another.",
|
||||
"required": ["type", "targetRef"],
|
||||
"required": ["type", "target", "targetRef"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"type": {
|
||||
|
||||
@@ -365,9 +365,9 @@ describe('entitySchemaValidator', () => {
|
||||
expect(() => validator(entity)).toThrow(/relations/);
|
||||
});
|
||||
|
||||
it('does not reject missing relations.target', () => {
|
||||
it('does reject missing relations.target', () => {
|
||||
delete entity.relations[0].target;
|
||||
expect(() => validator(entity)).not.toThrow(/relations/);
|
||||
expect(() => validator(entity)).toThrow(/relations/);
|
||||
});
|
||||
|
||||
it('does reject missing relations.targetRef', () => {
|
||||
|
||||
Reference in New Issue
Block a user