sapmentors / cap-community

SAP CAP Community
MIT License
97 stars 26 forks source link

Enhancement to service definition documentation #62

Open mattreddy3 opened 4 years ago

mattreddy3 commented 4 years ago

Copied from Slack per Gregor Wolf

One thing I struggled with for a while was the automated Service paths as described here: https://cap.cloud.sap/docs/cds/cdl#service-definitions

It mentions “kebab-case is enforced” - but no examples in any of the documentation (that I could find, at least) where the service name had two cased letters. I thought I had a caching issue when only my “old” services (“NotificationService” @ path “/notification”) were being served but the new ones weren’t, when really I had been trying to find my new service named “MasterDataService” at path “/masterdata” instead of the correct path of “/master-data”.

I’m aware I can add a @(path:“/newpath”) annotation to the service, but wanted to raise this flag in case anyone else was struggling with it. Perhaps it would help to add examples of how kebab-case is enforced or to mention that “PascalCase” is transformed to “pascal-case”? Thanks!