Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added top level property entityTypes #95

Merged
merged 22 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cc76d9b
initial commit
aramovic79 Nov 14, 2024
0e59e39
Merge branch 'main' of https://github.com/cap-js/ORD into fix/69-add-…
aramovic79 Nov 20, 2024
c015722
Merge branch 'main' into fix/69-add-missing-top-level-property-entity…
RoshniNaveenaS Nov 27, 2024
7fd665f
Merge branch 'fix/69-add-missing-top-level-property-entitytypes' of h…
aramovic79 Dec 3, 2024
8199513
Merge branch 'main' of https://github.com/cap-js/ORD into fix/69-add-…
aramovic79 Dec 3, 2024
30cc29e
construct entityTypes and entityTypeMappings arrays
aramovic79 Dec 4, 2024
b157ed4
Fix entityTypeTargets to be array of objects and not strings
aramovic79 Dec 4, 2024
44031df
check existance of @ORDExtensions on entity level
aramovic79 Dec 4, 2024
02c5e6f
change schema and service in the xmpl folder so the sample ord docume…
aramovic79 Dec 4, 2024
b232ba8
handle entity type version
aramovic79 Dec 5, 2024
80c7ccc
tests clean-up
aramovic79 Dec 5, 2024
96fef2a
minor change:rewrite the map statement
aramovic79 Dec 5, 2024
6a456b0
introduct LEVEL constant
aramovic79 Dec 5, 2024
05a3736
rename sample entities in xmpl app
aramovic79 Dec 5, 2024
a5fdaee
change the version handling
aramovic79 Dec 9, 2024
2860721
minor change
aramovic79 Dec 9, 2024
c449696
remove incorrect validateNamespace function
aramovic79 Dec 9, 2024
56f29db
Merge branch 'main' into fix/69-add-missing-top-level-property-entity…
aramovic79 Dec 9, 2024
64fbeec
add test for missing package.json
aramovic79 Dec 9, 2024
d01f752
Merge branch 'fix/69-add-missing-top-level-property-entitytypes' of h…
aramovic79 Dec 9, 2024
0135366
Merge branch 'main' of https://github.com/cap-js/ORD into fix/69-add-…
aramovic79 Dec 9, 2024
1218ec6
use constants with miningful names instead of oidIdParts[N]
aramovic79 Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions __tests__/__mocks__/localAndNonODMReferencedEntitiesCsn.json
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"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Tests for ORD document when .cdsrc.json has no \`ord\` property Successfully create ORD Documents with no \`ord\` in .cdsrc.json 1`] = `
exports[`Tests for ORD document generated out of mocked csn files Tests for ORD document when .cdsrc.json has no \`ord\` property Successfully create ORD Documents with no \`ord\` in .cdsrc.json 1`] = `
{
"$schema": "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
"apiResources": [
Expand Down Expand Up @@ -291,7 +291,7 @@ exports[`Tests for ORD document when .cdsrc.json has no \`ord\` property Success
"partOfProducts": [
"customer:product:capire.bookshop.ord.sample:",
],
"shortDescription": "Short description for capire bookshop ord sample",
"shortDescription": "Short description of capire bookshop ord sample",
"title": "capire bookshop ord sample",
"vendor": "customer:vendor:Customer:",
"version": "1.0.0",
Expand All @@ -301,7 +301,7 @@ exports[`Tests for ORD document when .cdsrc.json has no \`ord\` property Success
"products": [
{
"ordId": "customer:product:capire.bookshop.ord.sample:",
"shortDescription": "Description for capire bookshop ord sample",
"shortDescription": "Short description of capire bookshop ord sample",
"title": "capire bookshop ord sample",
"vendor": "customer:vendor:customer:",
},
Expand Down
Loading
Loading