Closed ductaily closed 1 month ago
I extended service definitions of bookshop in the test:
using { sap.capire.bookshop as my } from '../db/schema';
service AdminService @(requires:'authenticated-user') {
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
event BookCreated : {
ID : Integer;
title : String @title: 'Title';
};
event BookDeleted : {
ID : Integer;
};
event BookUpdated : {
ID : Integer;
title : String @title: 'Title';
}
}
using { sap.capire.bookshop as my } from '../db/schema';
service CatalogService @(path:'/browse') {
@readonly entity Books as select from my.Books {*,
author.name as author
} excluding { createdBy, modifiedBy };
@requires: 'authenticated-user'
action submitOrder (book: Books:ID, quantity: Integer);
event BookCreated : {
ID : Integer;
title : String @title: 'Title';
};
event BookDeleted : {
ID : Integer;
};
event BookUpdated : {
ID : Integer;
title : String @title: 'Title';
}
}
Resulting ORD Document:
{
"$schema": "https://sap.github.io/open-resource-discovery/spec-v1/interfaces/Document.schema.json",
"apiResources": [
//...
],
"description": "this is an application description",
"eventResources": [
{
"description": "This is an example event catalog that contains only a partial ODM cap-js-ord V1 event",
"extensible": {
"supported": "no",
},
"ordId": "capjs.ord:eventResource:undefined.AdminService:v1",
"partOfGroups": [
"sap.cds:service:capjs.ord:undefined.AdminService",
],
"partOfPackage": "capjsord:package:undefined:v1",
"releaseStatus": "beta",
"resourceDefinitions": [
{
"accessStrategies": [
{
"type": "open",
},
],
"mediaType": "application/json",
"type": "asyncapi-v2",
"url": "/.well-known/open-resource-discovery/v1/api-metadata/AdminService.asyncapi2.json",
},
],
"shortDescription": "Example ODM Event",
"title": "ODM capjsord Events",
"version": "1.0.0",
"visibility": "public",
},
{
"description": "This is an example event catalog that contains only a partial ODM cap-js-ord V1 event",
"extensible": {
"supported": "no",
},
"ordId": "capjs.ord:eventResource:undefined.CatalogService:v1",
"partOfGroups": [
"sap.cds:service:capjs.ord:undefined.CatalogService",
],
"partOfPackage": "capjsord:package:undefined:v1",
"releaseStatus": "beta",
"resourceDefinitions": [
{
"accessStrategies": [
{
"type": "open",
},
],
"mediaType": "application/json",
"type": "asyncapi-v2",
"url": "/.well-known/open-resource-discovery/v1/api-metadata/CatalogService.asyncapi2.json",
},
],
"shortDescription": "Example ODM Event",
"title": "ODM capjsord Events",
"version": "1.0.0",
"visibility": "public",
},
],
"groups": [
{
"groupId": "sap.cds:service:capjs.ord:undefined.AdminService",
"groupTypeId": "sap.cds:service",
"title": "Admin Service Title",
},
{
"groupId": "sap.cds:service:capjs.ord:undefined.CatalogService",
"groupTypeId": "sap.cds:service",
"title": "Catalog Service Title",
},
],
"openResourceDiscovery": "1.9",
"packages": [
{
"description": "Description for capjs ord",
"ordId": "capjsord:package:undefined:v1",
"partOfProducts": [
"customer:product:capjs.ord:",
],
"shortDescription": "Short description for capjs ord",
"title": "capjs ord",
"vendor": "customer:vendor:Customer:",
"version": "1.0.0",
},
],
"policyLevel": "none",
"products": [
{
"ordId": "customer:product:cap.js.ord:",
"shortDescription": "Description for cap js ord",
"title": "cap js ord",
"vendor": "customer:vendor:customer:",
},
],
}
@Fannon
Result with our example: document.json
The tests are failing and I can't reproduce the error on @zongqichen and my machine.
@RoshniNaveenaS Do you have an idea what could be the cause and how we could resolve it?
The tests are failing and I can't reproduce the error on @zongqichen and my machine.
@RoshniNaveenaS Do you have an idea what could be the cause and how we could resolve it?
I see now that the failure is caused by the new CDS Version: https://github.tools.sap/cap/cds/releases/tag/rel%2F8.2.0
The LinkedDefinitions were changed and do not contain map
, forEach
, ... anymore.
The tests are failing and I can't reproduce the error on @zongqichen and my machine. @RoshniNaveenaS Do you have an idea what could be the cause and how we could resolve it?
I see now that the failure is caused by the new CDS Version: https://github.tools.sap/cap/cds/releases/tag/rel%2F8.2.0 The LinkedDefinitions were changed and do not contain
map
,forEach
, ... anymore.
Cool, your commit has fixed it. I have one more question, it seems github action will always install the latest version of cds, and brings the issue like it. We should control peerDepdencies upper limits as well?
The tests are failing and I can't reproduce the error on @zongqichen and my machine. @RoshniNaveenaS Do you have an idea what could be the cause and how we could resolve it?
I see now that the failure is caused by the new CDS Version: https://github.tools.sap/cap/cds/releases/tag/rel%2F8.2.0 The LinkedDefinitions were changed and do not contain
map
,forEach
, ... anymore.Cool, your commit has fixed it. I have one more question, it seems github action will always install the latest version of cds, and brings the issue like it. We should control peerDepdencies upper limits as well?
@zongqichen Yes, we should specify the exact version.
@ductaily: There are a few merge conflicts to be resolved...
@zongqichen @Fannon
@ductaily: There are a few merge conflicts to be resolved...
@zongqichen @Fannon
Done.
@RoshniNaveenaS @RamIndia : Can we merge this PR? cc: @ductaily @zongqichen @Fannon
@ductaily : I guess the following one is solved as well, correct?
The groups for events shall be services, not the individual events → but then the last two entries in the bookstore sample are duplicate
@ductaily : I guess the following one is solved as well, correct?
The groups for events shall be services, not the individual events → but then the last two entries in the bookstore sample are duplicate
Correct. This PR would also solve that issue.
Address issues from https://github.com/cap-js/ord/issues/38
eventResources