cap-js / ord

Open Resource Discovery (ORD) is a protocol that allows applications and services to self-describe their exposed resources and capabilities. This plugin enables generation of ORD document for CAP based applications.
Apache License 2.0
3 stars 4 forks source link

feat: add custom index page to the ord-sample #83

Open aramovic79 opened 1 week ago

aramovic79 commented 1 week ago

Bellow is shown how the index page looks like now. As you can see in the code, the implemented changes have nothing to do with the ORD Plugin, but only with the example application(/xmpl).

image

swennemers commented 1 week ago

Thx @aramovic79 to immediately jump on the issue. I would prefer a solution where the plugin can provide this snippet, I think, I saw some other plugins to contribute to the page once. @RamIndia , can you help with the extension points to hook in for that?

swennemers commented 3 days ago

@aramovic79 & @zongqichen , have a look at https://www.npmjs.com/package/@sap/cds?activeTab=code /@sap/cds/app/index.js, the plugin should return its endpoint as a CAP service (although manually implemented), then it would appear here automatically. @RamIndia suggested to do the same to support the multi tenancy issue #58.

aramovic79 commented 2 days ago

@aramovic79 & @zongqichen , have a look at https://www.npmjs.com/package/@sap/cds?activeTab=code /@sap/cds/app/index.js, the plugin should return its endpoint as a CAP service (although manually implemented), then it would appear here automatically. @RamIndia suggested to do the same to support the multi tenancy issue #58.

By looking at the code, it seems to me that the change should be implemented not even in @sap/cds but in @sap/cds-dk. @RamIndia : Am I right? If so, not sure which change shall be done in the ORD Plugin so that @sap/cds(index.js) "sees" it's endpoint as a CAP service. I think that diving into the code with debugger is not the right approach, we need someone from the CAP team to point us in the right direction.