-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added top level property entityTypes (#95)
* initial commit * construct entityTypes and entityTypeMappings arrays * Fix entityTypeTargets to be array of objects and not strings * check existance of @ORDExtensions on entity level * change schema and service in the xmpl folder so the sample ord document is valid * handle entity type version * tests clean-up * minor change:rewrite the map statement * introduct LEVEL constant * rename sample entities in xmpl app * change the version handling * minor change * remove incorrect validateNamespace function * add test for missing package.json * use constants with miningful names instead of oidIdParts[N] --------- Co-authored-by: RoshniNaveenaS <[email protected]>
- Loading branch information
1 parent
341a514
commit 04441d1
Showing
23 changed files
with
1,139 additions
and
693 deletions.
There are no files selected for viewing
121 changes: 121 additions & 0 deletions
121
__tests__/__mocks__/localAndNonODMReferencedEntitiesCsn.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{ | ||
"$version": "2.0", | ||
"definitions": { | ||
"LocalService": { | ||
"@ORD.Extensions.title": "This is Local Service title", | ||
"kind": "service" | ||
}, | ||
"LocalService.DummyEntityA": { | ||
"@ODM.entityName": "SomeODMEntity", | ||
"@ODM.oid": "id", | ||
"@ODM.root": true, | ||
"@title": "Dummy title of Entity with corresponding ODM entity title", | ||
"elements": { | ||
"id": { | ||
"key": true, | ||
"type": "cds.UUID" | ||
}, | ||
"propertyA": { | ||
"length": 10, | ||
"type": "cds.String" | ||
}, | ||
"propertyB": { | ||
"length": 20, | ||
"type": "cds.String" | ||
} | ||
}, | ||
"kind": "entity", | ||
"projection": { | ||
"from": { | ||
"ref": [ | ||
"sap.cds.demo.EntityWithCorrespondingODMEntity" | ||
] | ||
} | ||
} | ||
}, | ||
"LocalService.DummyEntityB": { | ||
"@EntityRelationship.entityType": "sap.sm:SomeAribaDummyEntity", | ||
"@ObjectModel.compositionRoot": true, | ||
"@title": "Dummy title of Ariba entity", | ||
"elements": { | ||
"id": { | ||
"key": true, | ||
"type": "cds.UUID" | ||
}, | ||
"propertyC": { | ||
"length": 10, | ||
"type": "cds.String" | ||
}, | ||
"propertyD": { | ||
"length": 20, | ||
"type": "cds.String" | ||
} | ||
}, | ||
"kind": "entity", | ||
"projection": { | ||
"from": { | ||
"ref": [ | ||
"sap.cds.demo.SomeAribaEntity" | ||
] | ||
} | ||
} | ||
}, | ||
"LocalService.TitleChange2": { | ||
"elements": { | ||
"ID": { | ||
"type": "cds.Integer" | ||
}, | ||
"title": { | ||
"@title": "Changed title", | ||
"type": "cds.String" | ||
} | ||
}, | ||
"kind": "event" | ||
}, | ||
"sap.cds.demo.EntityWithCorrespondingODMEntity": { | ||
"@ODM.entityName": "SomeODMEntity", | ||
"@ODM.oid": "id", | ||
"@ODM.root": true, | ||
"@title": "Dummy title of Entity with corresponding ODM entity title", | ||
"elements": { | ||
"id": { | ||
"key": true, | ||
"type": "cds.UUID" | ||
}, | ||
"propertyA": { | ||
"length": 10, | ||
"type": "cds.String" | ||
}, | ||
"propertyB": { | ||
"length": 20, | ||
"type": "cds.String" | ||
} | ||
}, | ||
"kind": "entity" | ||
}, | ||
"sap.cds.demo.SomeAribaEntity": { | ||
"@EntityRelationship.entityType": "sap.sm:SomeAribaDummyEntity", | ||
"@ObjectModel.compositionRoot": true, | ||
"@title": "Dummy title of Ariba entity", | ||
"elements": { | ||
"id": { | ||
"key": true, | ||
"type": "cds.UUID" | ||
}, | ||
"propertyC": { | ||
"length": 10, | ||
"type": "cds.String" | ||
}, | ||
"propertyD": { | ||
"length": 20, | ||
"type": "cds.String" | ||
} | ||
}, | ||
"kind": "entity" | ||
} | ||
}, | ||
"meta": { | ||
"creator": "CDS Compiler v5.4.4", | ||
"flavor": "inferred" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.