diff --git a/__tests__/__snapshots__/ordCdsrc.test.js.snap b/__tests__/__snapshots__/ordCdsrc.test.js.snap index 3372c8c..1449d55 100644 --- a/__tests__/__snapshots__/ordCdsrc.test.js.snap +++ b/__tests__/__snapshots__/ordCdsrc.test.js.snap @@ -140,6 +140,11 @@ exports[`Tests for default ORD document when .cdsrc.json is present Successfully "groupTypeId": "sap.cds:service", "title": "This is test Catalog Service title", }, + { + "groupId": "sap.cds:service:sap.test.cdsrc.sample:CinemaService", + "groupTypeId": "sap.cds:service", + "title": "This is test Cinema Service title", + }, ], "openResourceDiscovery": "1.10", "packages": [ diff --git a/__tests__/__snapshots__/ordPackageJson.test.js.snap b/__tests__/__snapshots__/ordPackageJson.test.js.snap index 5a40632..7c72444 100644 --- a/__tests__/__snapshots__/ordPackageJson.test.js.snap +++ b/__tests__/__snapshots__/ordPackageJson.test.js.snap @@ -115,6 +115,11 @@ exports[`Tests for default ORD document when .cdsrc.json is not present Successf "groupTypeId": "sap.cds:service", "title": "This is test Catalog Service title", }, + { + "groupId": "sap.cds:service:customer.capirebookshopordsample:CinemaService", + "groupTypeId": "sap.cds:service", + "title": "This is test Cinema Service title", + }, ], "openResourceDiscovery": "1.9", "packages": [ diff --git a/__tests__/bookshop/db/schema.cds b/__tests__/bookshop/db/schema.cds index ea9a431..57cd392 100644 --- a/__tests__/bookshop/db/schema.cds +++ b/__tests__/bookshop/db/schema.cds @@ -32,3 +32,11 @@ entity Genres : sap.common.CodeList { children : Composition of many Genres on children.parent = $self; } + +entity Movies : managed { + key ID : Integer; + title : localized String(111); + descr : localized String(1111); + author : Association to Authors; + genre : Association to Genres; +} diff --git a/__tests__/bookshop/srv/cat-service.cds b/__tests__/bookshop/srv/cat-service.cds index 739ff07..bd71923 100644 --- a/__tests__/bookshop/srv/cat-service.cds +++ b/__tests__/bookshop/srv/cat-service.cds @@ -34,7 +34,7 @@ service CatalogService @(path: '/browse') { annotate CatalogService with @ORD.Extensions: { title : 'This is test Catalog Service title', shortDescription : 'short description for test CatalogService', - visibility : 'internal', + visibility : 'private', version : '2.0.0', extensible : {supported: 'yes'} }; \ No newline at end of file diff --git a/__tests__/bookshop/srv/cinema-service.cds b/__tests__/bookshop/srv/cinema-service.cds new file mode 100644 index 0000000..97e9cbe --- /dev/null +++ b/__tests__/bookshop/srv/cinema-service.cds @@ -0,0 +1,40 @@ +using {sap.capire.bookshop as my} from '../db/schema'; + +service CinemaService @(path: '/browse') { + + @readonly + entity Movies as + select from my.Movies { + *, + author.name as author + } + excluding { + createdBy, + modifiedBy + }; + + @requires: 'authenticated-user' + action submitOrder(book : Movies:ID, quantity : Integer); + + event MovieCreated : { + ID : Integer; + title : String @title: 'Title'; + }; + + event MovieDeleted : { + ID : Integer; + }; + + event MovieUpdated : { + ID : Integer; + title : String @title: 'Title'; + } +} + +annotate CinemaService with @ORD.Extensions: { + title : 'This is test Cinema Service title', + shortDescription : 'short description for test CinemaService', + visibility : 'internal', + version : '1.0.0', + extensible : {supported: 'yes'} +}; \ No newline at end of file