Skip to content

Commit f77e8f0

Browse files
renejeglinskyziyang-workschgeovmikhailenkomofterdinger
authored
Major Release June 2024 (#1102)
* replace `npm add` with `npm install -D` for typescript setup (#986) replace `npm add` with `npm install -D` * Fix bg-color of title on home page * [CAPJAVA^3] Fix the wrong precondition in the list (#983) Fix the wrong precondition in the list * fix CDL * Explain PostgreSQL limitations (#974) * Explain PostgreSQL limitations * Update databases-postgres.md * Update databases-postgres.md * Update databases-postgres.md * Update databases-postgres.md * Update databases-postgres.md * Update databases-postgres.md * Update databases-postgres.md * Update guides/databases-postgres.md Co-authored-by: Stefan Henke <[email protected]> * Update guides/databases-postgres.md Co-authored-by: Stefan Henke <[email protected]> * Update guides/databases-postgres.md Co-authored-by: Adrian Görler <[email protected]> * Update guides/databases-postgres.md * editing * Update guides/databases-postgres.md Co-authored-by: René Jeglinsky <[email protected]> * Update guides/databases-postgres.md Co-authored-by: René Jeglinsky <[email protected]> * Update databases-postgres.md * Update databases-postgres.md * Update databases-postgres.md --------- Co-authored-by: Stefan Henke <[email protected]> Co-authored-by: Adrian Görler <[email protected]> Co-authored-by: Rene Jeglinsky <[email protected]> * Mention that draft decorations can't be used in annotation expressions (#984) * Mention that draft decorations can't be used in annotation expressions Sth like `(IsActiveEntity = false)` doesn't work. * Update cds/cdl.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update cds/cdl.md Co-authored-by: Steffen Weinstock <[email protected]> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Steffen Weinstock <[email protected]> * fix cdl * . * clearer beginning for beginners * Remove docs about obsolete K8s service bindings config (#991) * Remove obsolete tip in `cds.env` guide (#996) * Remove obsolete tip in `cds.env` guide * File name * CDL: Added learn more about path annotation video (#995) * learn more about path annotation video * add video on test data generation * Java Reflection API: Fix localized example (#999) * XML to Markdown syntax on images (#997) * image syntax in markdown * image syntax in markdown * changed image languge to markdown * changed image langugage to markdown * changed image to markdown * changed images to markdown * changed to markdown * changed to markdown * changed to markdown * changed to markdown * change to markdown * changed syntax to markdown * changed syntax to markdown * changed syntax to markdown * changed to markdown syntax * changed to markdown * changed to markdown syntax * changed syntax to markdown * fix --------- Co-authored-by: Rene Jeglinsky <[email protected]> * consistent naming for App Router (#1002) * Update dependency com.sap.cds:cds4j-api to v2.10.1 (#1003) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency sass to v1.77.5 (#992) chore(deps): update dependency sass to v1.77.5 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @sap/cds-dk to v7.9.3 (#988) chore(deps): update dependency @sap/cds-dk to v7.9.3 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Data Privacy Updates (#945) * tested new flow * fix email ref in pdm service * updates, new screenshot * added date of birth * new screenshot * re-added sections * Update dependency com.sap.cds:cds-services-api to v2.10.1 (#1012) * editing * Mermaid docs (#1014) * Mermaid docs * Apply suggestions from code review --------- Co-authored-by: René Jeglinsky <[email protected]> * doc(deploy): explain deploy --profile (#944) * [cds^8] - Nodejs : rm req.user.<tenant/locale> compat (#953) cds8: rm req.user.<tenant/locale> compat Co-authored-by: sjvans <[email protected]> Co-authored-by: René Jeglinsky <[email protected]> * [cds^8] No strings in INSERT.into and UPSERT.into (#966) No strings in INSERT.into and UPSERT.into * doc(completion)(8.0): add fish shell entry (#989) doc(completion): add fish shell entry * Remove cds.Subscriber from mock users (#1000) * Remove cds.Subscriber from mock users * addtional cleanup * docs(java outbox): Show hard-coded value `ordered` for default outboxes (#1027) Users can't change `ordered` of `DefaultOutboxOrdered` and `DefaultOutboxUnordered`. But the documentation is not _that_ clear about that the first time reading this document. This commit adds the default and non-changable values for `ordered` for these two default outboxes and mentions that they can't be changed in the option description. * fix(cds-env): Add missing newline in YAML snippet (#1021) A source-code line was cut off. * mention hdb_nodejs_threadpool_size (#1028) * fix(java): Fix variable mismatch: `ctx` vs `context` (#1024) There were two snippets that were not consistent in the naming of their context variable. In one case, `ctx` did not exist, in the other, `context` did not exist. * Remove CdsDataStore documentation from PersistenceService chapter (#1005) * Remove CdsDataStore documentation from PersistenceService chapter PersistenceService is preferred over CdsDataStore. Also configuring custom CdsDataStoreConnector instances is not recommened anymore since we support additional PersistenceServices out-of-the-box meanwhile as well * Update query-api.md --------- Co-authored-by: René Jeglinsky <[email protected]> * hard coded vs usr defined strlength (#1017) * hard coded vs usr defined strlength ... make foot note clearer * Update cds/types.md Co-authored-by: Andre Meyering <[email protected]> --------- Co-authored-by: Steffen Weinstock <[email protected]> Co-authored-by: Andre Meyering <[email protected]> * ci: Update `actions/configure-pages` to v5 (#1033) See https://github.com/actions/configure-pages/releases * ci: Update `actions/checkout` to v4 (#1032) * ci: Update `actions/setup-node` to v4 (#1031) * chore(deps): update dependency cspell to v8.9.0 (#1030) * fix(observability): Fix snytax error in YAML snippets (#1022) One snippet used `=` instead of `: `. Change `# […]` to `# ...` * chore(deps): update dependency sass to v1.77.6 (#1018) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Complete table for `cds add` (#1029) Add all facets to table Co-authored-by: Christian Georgi <[email protected]> * docs(java): Add more newlines to improve readability of snippets (#1020) * docs(java outbox): Improve description for `.cdsrc.json` (#1019) * Update limitations of SQLite (#1026) We do not document limitations wrt. RIGHT|FULL OUTER JOINs and UNIONs any longer. These SQL constructs are not used by the CAP Java runtime. The limitations could be observed in view definitions and hence rather have to be documented in the CQL area. * Add Git Bash on Windows disclaimer (#1037) * Add Git Bash on Windows disclaimer * Move disclaimer to CAP on Azure section * rework * Update get-started/troubleshooting.md --------- Co-authored-by: René Jeglinsky <[email protected]> * docs(java): Fix syntax errors in Java snippets (#1035) * . * SAP Document Management Service Plugin Documentation (#1034) * SAP Document Management Service Plugin Documentation Adding the documentation for SAP Document Management Service plugin * Update plugins/index.md * Update plugins/index.md * Update plugins/index.md * Update plugins/index.md * Update plugins/index.md * Changes requested * Update index.md * cosmetics --------- Co-authored-by: Mahati Shankar <[email protected]> Co-authored-by: Mahati Shankar <[email protected]> * New index page style * Hint to Mermaid extension * chore(deps): update dependency @sap/eslint-plugin-cds to v3.0.4 (#1038) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency cspell to v8.9.1 (#1041) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * new command: cds compile --to hana (#1025) Co-authored-by: René Jeglinsky <[email protected]> Co-authored-by: Christian Georgi <[email protected]> * SAP Document Management Service Plugin UI changes (#1044) * Enforce chai-as-promised 7 Version 8 is ESM only, which we can't run atm. * Add full path to pom.xml in auditlog section. (#1048) Update auditlog.md * docs(Java): Remove unnecessary UML-like graphic (#1011) There is a diagram in the Java CDS Data guide that does not really bring any benefit. Not just that: it does not match the text: singular/ plural forms do not match the described entities. As no relation between the entities is shown, I suggest to remove it. Co-authored-by: Mahati Shankar <[email protected]> * Fix #1045 (#1046) * minor typo fix in core-services.md (#1051) * fix typo and rearrange to avoid multiple plural-possessive-quotes in … (#1050) fix typo and rearrange to avoid multiple plural-possessive-quotes in core-services.md Spotted "servce" [sic] then thought I'd rearrange the phrase anyway to help avoid two plural-possessive-quotes in one phrase :-) * [cds^8] remove req._ (we have req.http now) (#741) * remove req._ we have req.http now * add header example + warning * Update node.js/events.md * Update node.js/events.md --------- Co-authored-by: René Jeglinsky <[email protected]> Co-authored-by: Mahati Shankar <[email protected]> * Since instead of requires * Update the FAQ for concurrency problems (#990) * Introduce placeholder for fragment (#1052) * docs: Update Fiori screenshot to use the latest version (#1065) I've updated the Fiori screenshot of the "In a Nutshell" guide to use the latest version of the cloud-sap-samples project. I've also used Safari and have sized the window to be the same as the previous screenshot. The PNG was optimized for smaller size. * docs(In a Nutshell): Mention path `/browse` in text also (#1063) While reading the section for the first time, I wondered why the next sections talk about `/browse`. Where did it come from? Turns out, I was lazy and didn't read the second CDS file. With this commit, let's make it a little bit more clear that the catalog service has a different URL. * docs(Grow As You Go): Add `--for production` to multitenancy step (#1062) If `cds add multitenancy` is run without the `--for production`, local app development will not work out-of-the-box. Because users may just copy&paste all snippets to play around, make the step production-only and link the multitenancy guide. * docs(Java): Add filenames to YAML snippets (#1059) Most snippets refer to a Java project's `application.yaml`. This is often implicit knowledge, which has to be induced from the surrounding context. Let's make it more explicit. * docs(Java): Mention default mock user in getting started guide (#1061) If the user followed the previous section "Add CloudFoundry target platform", the `cds-starter-cloudfoundry` dependency is added which causes all endpoints to be authenticated by default. That also means that if the user starts their app, a username and password is requested as soon as they open a service in their browser. But since this is the "Getting Started" guide, users won't know which username/password combination they are expected to use. This is confusing. So let's mention a username that works. Co-authored-by: René Jeglinsky <[email protected]> * Make Maven host configurable * docs(Java): Fix typos, grammar, and format snippets (#1058) Co-authored-by: René Jeglinsky <[email protected]> * fix link anchor * No code bg as sole value in table cells * Add orphaned Features page to sidebar * Replace semiofficial API `DELETE(Books).byKey(42)` with `DELETE.from(Books, 42)` (#1054) * docs(Java Building Plugins): Format code, fix typos, snippet filenames (#1056) Co-authored-by: René Jeglinsky <[email protected]> * Update cds-typer.md (#1057) Update output of `cds-typer --help`, which has changed a lot since the former output of 0.4.0. Co-authored-by: René Jeglinsky <[email protected]> * docs(Java): Adapt CQL counterparts: fix syntax (#1007) Co-authored-by: René Jeglinsky <[email protected]> * Start a test server inside describe (#1068) * Start a test server inside describe * move tip and make it less prominent to avoid to much noise * rephrase sentence * Update node.js/cds-test.md Co-authored-by: René Jeglinsky <[email protected]> --------- Co-authored-by: Rene Jeglinsky <[email protected]> * Update learning-sources.md (#1049) * Update learning-sources.md Add official SAP Learning Journeys available on learning.sap.com * Update learning-sources.md * docs(Java): Fix Intellij part: make it more generic (#1008) * docs(Java): Fix Intellij part: make it more generic The latest Intellij version has a `Generated Sources Root` marker, that should be used instead of `Sources Root`. Also, all keyboard shortcuts may differ, so let's make the section more generic. * Apply suggestions from code review Co-authored-by: René Jeglinsky <[email protected]> --------- Co-authored-by: René Jeglinsky <[email protected]> * fix(In a Nutshell): Fix class name for catalog service handler (#1066) There were two problems with the snippets. The first was the missing `Handler` suffix in the filename, which is used for the Java `tiny-sample`, the second was that the class name didn't match the filename, as is common and required in Java. This commit fixes it. I have tested the guide the with changes and it works. Co-authored-by: Robin <[email protected]> * Removed Beta from change-tracking.md (#1070) * docs(Java): Remove file listings: they are error prone and outdated (#1009) * docs(Java): Remove file listings: they are error prone and outdated In previous commits, I've adapted a few file listings as they were outdated. This commit removes a few of them, as they don't have any benefit and are rather confusing if we ever change the initial file layout again (e.g. rename `schema.cds` to `cds-model.cds` or similar). * Apply suggestions from code review * Update java/getting-started.md * Update java/getting-started.md --------- Co-authored-by: René Jeglinsky <[email protected]> * troubleshooting: mention logging for cloud sdk (#1069) more-troubleshooting * Add requires section to observability mta example (#1074) * fix: it's not propagated from msg.id (#1053) * Always use `cds add xsuaa --for production` * Migration Guide for CAP Java 3.0 (#892) * Migration Guide for CAP Java 3.0 (#890) * Changes in cds-maven-plugin (#893) * Update migration.md * Update java/migration.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix typo * Update migration.md * Fixed wrong property order (#935) * [CAP Java 3.0] Explain removal of classic MTX in migration guide (#942) * Added table for removed properties (#936) * Update migration.md * Update migration.md * Update migration.md * Update java/migration.md Co-authored-by: Marc Becker <[email protected]> * Update java/migration.md Co-authored-by: Marc Becker <[email protected]> * Update migration.md * Update java/migration.md * Update java/migration.md --------- Co-authored-by: Marc Becker <[email protected]> * Update migration.md * Update java/migration.md * describing new semantics of `cds.outbox.persistent.enabled` (#987) * Describe changes of goal generate (#993) * Update migration.md * Update migration.md * cds.sql.hana.optimizationMode: hex * Java 3 Migration: CqnSearchTermPredicate (#1015) * [3.0] Removal of `cds-feature-xsuaa` (#918) Co-authored-by: Marc Becker <[email protected]> * Add removed property * cqn(String) methods * $user.tenant * 3.0: Lazy localization by default (#1023) * $user.tenant deprecation * document cds.auditLog.personalData.throwOnMissingDataSubject change * Update migration.md * CqnSearchPredicate * Session Context Variables * Prohibit star-expand and inline-all (#1039) * Apply suggestions from code review Co-authored-by: Matthias Schur <[email protected]> * Remove warning * Update minimum versions in general docs * [3.0] IAS support in Remote Services and IAS migration guide (#1047) * ias scenarios * ias scenarios * ias scenarios * Apply suggestions from code review Co-authored-by: Marc Becker <[email protected]> * extract details to security.md * bullet point list * Update java/cqn-services/remote-services.md Co-authored-by: Marc Becker <[email protected]> * Update java/cqn-services/remote-services.md * Update java/cqn-services/remote-services.md * Update java/migration.md * Update java/security.md * Update java/security.md * Update java/security.md * Update java/security.md * Update java/security.md * fix syntax * added code block * fix formatting * cosmetics --------- Co-authored-by: Marc Becker <[email protected]> Co-authored-by: Mahati Shankar <[email protected]> Co-authored-by: Mahati Shankar <[email protected]> * Update java/migration.md Co-authored-by: Mahati Shankar <[email protected]> * added new default value of message service structured flag * changed default value in java messaging docs * fixed link * Update migration.md * Update java/migration.md * Update java/migration.md * Update java/migration.md * cosmetics --------- Co-authored-by: Markus Ofterdinger <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Adrian Görler <[email protected]> Co-authored-by: René Jeglinsky <[email protected]> Co-authored-by: Thomas Bonk <[email protected]> Co-authored-by: Matthias Schur <[email protected]> Co-authored-by: Stefan Henke <[email protected]> Co-authored-by: Vladimir <[email protected]> Co-authored-by: Mahati Shankar <[email protected]> Co-authored-by: Mahati Shankar <[email protected]> Co-authored-by: BraunMatthias <[email protected]> Co-authored-by: Thomas Bonk <[email protected]> * [3.x] cds-services-archetype improvements (#1013) * [3.x] cds-services-archetype improvements * Update building.md * Update building.md * Add link to SAP Hana Cloud system limits (#1078) * Add link to SAP Hana Cloud system limits * improve * removed outdated note * e.g. to for example (#1081) * switch from eg * edit * edit * docs(Java): Update link to GraalVM guide (#1082) * docs(Java): Update link to GraalVM guide The documentation was split into tutorials and concept documentation. * Update java/operating-applications/optimizing.md Co-authored-by: Marc Becker <[email protected]> --------- Co-authored-by: Marc Becker <[email protected]> * Update learning-sources.md (#1075) * Update learning-sources.md Linking Discovery centre missions of BTP Developer's Guide * Update get-started/learning-sources.md --------- Co-authored-by: René Jeglinsky <[email protected]> * chore(deps): update dependency cspell to v8.10.0 (#1084) * chore(deps): update dependency eslint-plugin-vue to v9.27.0 (#1080) * chore(deps): update dependency @sap/cds to v7.9.3 (#1071) * chore(deps): update dependency @sap/cds-mtxs to v1.18.2 (#1055) * chore(deps): update dependency com.sap.cds:cds-services-api to v2.10.2 (#1085) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @sap/cds-dk to v7.9.4 (#1040) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Steffen Waldmann <[email protected]> * typo * Clearer CDS/CDL (#1076) * edit synopsis * make introduction clearer * Update cds/index.md Co-authored-by: Christian Georgi <[email protected]> --------- Co-authored-by: Christian Georgi <[email protected]> * Fix link to `compile` options (#1086) * cosmetics * chore(deps): update dependency cspell to v8.10.4 (#1087) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency vitepress to v1.3.0 (#1088) * Avoid `cap>=ire` in the window title (#1089) This is hard to search for. * Remove abstract services example (#1090) * fix learn more link * feat: deep search is available for nodejs (#1091) feat: deep search is available with @cap-js/dbs * [cds^8]: remove deprecated api srv. stream (#998) remove deprecated api Co-authored-by: D070615 <[email protected]> Co-authored-by: René Jeglinsky <[email protected]> * [cds^8] telemetry plugin: remove beta flag (#1001) * Added section to describe how parts of the UI can be hidden based on user role (#940) * Update fiori.md * edits --------- Co-authored-by: Rene Jeglinsky <[email protected]> * SDM plugin menu (#1095) * Java: Fix bulk insert example (#1099) * Update many to many relation example (#1093) * Update many to many relation example Hi @renejeglinsky, while helping colleagues, I noticed that the many to many example is chosen poorly. The current example does not consider that this won't work with Fiori elements and I adjusted the sample + added a description for Fiori. BR, Marten * Update domain-modeling.md * Update domain-modeling.md * Update guides/domain-modeling.md Co-authored-by: Steffen Weinstock <[email protected]> * Update guides/domain-modeling.md * Update guides/domain-modeling.md --------- Co-authored-by: Steffen Weinstock <[email protected]> Co-authored-by: René Jeglinsky <[email protected]> * removed outdated link * WIP: .hdbcds to .hdbtable migration guide (#825) * Rough draft of guide * Remove part about calculated elements * Typo * Use temporal sample model + add @cds.valid.key * Bit better sample for doc comments * some changes * update * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Patrice Bender <[email protected]> * Rephrase section on associations ... hopefully increasing clarity * Update cds/compiler-hdbcds-to-hdbtable.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * rephrase section on doc comments * add a note * Update cds/compiler-hdbcds-to-hdbtable.md Co-authored-by: simonoswald <[email protected]> * Update cds/compiler-hdbcds-to-hdbtable.md Co-authored-by: René Jeglinsky <[email protected]> * Some modifications * adapt AI generated synopsis * made some notes to infor or warn blocks * Update cds/compiler-hdbcds-to-hdbtable.md Co-authored-by: simonoswald <[email protected]> * Update cds/compiler-hdbcds-to-hdbtable.md Co-authored-by: simonoswald <[email protected]> * first edit * consistent formatting for format vs file * edits * cosmetics * Do the TODOs * add note on migration guide * Update cds/compiler-hdbcds-to-hdbtable.md Co-authored-by: René Jeglinsky <[email protected]> * added detail box for error message * Update cds/compiler-hdbcds-to-hdbtable.md * update to frontmatter --------- Co-authored-by: Steffen Weinstock <[email protected]> Co-authored-by: Patrice Bender <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: René Jeglinsky <[email protected]> Co-authored-by: Mahati Shankar <[email protected]> * CAP Plugin: cap-js ord plugin (#1064) * adding ord plugin docs * Update index.md * Update plugins/index.md Co-authored-by: René Jeglinsky <[email protected]> * Update plugins/index.md Co-authored-by: René Jeglinsky <[email protected]> * Removing the gif till cds8 * minor changes * Update index.md * editing * moved --------- Co-authored-by: René Jeglinsky <[email protected]> * [cds^8] cds.middlewares.before (#1094) * [cds^8] cds.middlewares.before * rework cds.middlewares.before * Update node.js/cds-serve.md * Update node.js/cds-serve.md * Apply suggestions from code review --------- Co-authored-by: René Jeglinsky <[email protected]> * cds8: switch on garbage collection of stale drafts by default (#929) * cds8: switch on garbage collection of stale drafts by default * Update node.js/fiori.md --------- Co-authored-by: René Jeglinsky <[email protected]> * [cds^8] Node.js - rm legacy config for draft locks (#896) Node.js - rm dropped legacy config for draft locks * Destination caching is enabled by default (#1016) * Destination caching is enabled by default * Update guides/using-services.md Co-authored-by: René Jeglinsky <[email protected]> * Update guides/using-services.md Co-authored-by: Johannes Vogel <[email protected]> * Update guides/using-services.md --------- Co-authored-by: René Jeglinsky <[email protected]> Co-authored-by: Johannes Vogel <[email protected]> * ORD Plugin reorder (#1103) * reorder * Update menu.md --------- Co-authored-by: René Jeglinsky <[email protected]> * fix link * release page * Remove link to internal fragment for now * Fix element reference in CQN example on avoiding SQL injection (#1104) * Fix element reference in CQN example on avoiding SQL injection Pretty sure this should be `ID` not `title`, right? * Super minor lang fix As I have a PR open I may as well make a super minor fix too. * another minor fix colums -> columns * chore(deps): update dependency @sap/cds-compiler to v5 (#1101) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @sap/cds to v8 (#1106) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @sap/cds-dk to v8 (#1108) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @sap/cds-mtxs to v2 (#1107) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency sass to v1.77.8 (#1092) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency vitepress to v1.3.1 (#1109) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Move ORD plugin down, adjust screeshot * Adjust menu for SDM, ORD * Fix warnings from scss plugin * chore(deps): update dependency com.sap.cds:cds4j-api to v3 (#1110) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency com.sap.cds:cds-services-api to v3 (#1111) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Minor Fix in Java Remote Services Docs (#1113) Update remote-services.md * HEX mode is default (#1112) Co-authored-by: Mahati Shankar <[email protected]> --------- Co-authored-by: Ziyang Li <[email protected]> Co-authored-by: Christian Georgi <[email protected]> Co-authored-by: Vladimir <[email protected]> Co-authored-by: Markus Ofterdinger <[email protected]> Co-authored-by: Stefan Henke <[email protected]> Co-authored-by: Adrian Görler <[email protected]> Co-authored-by: hjboth <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Steffen Weinstock <[email protected]> Co-authored-by: Marc Becker <[email protected]> Co-authored-by: Steffen Waldmann <[email protected]> Co-authored-by: Matthias Schur <[email protected]> Co-authored-by: motaroberta <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Christian Georgi <[email protected]> Co-authored-by: Jörg Mann <[email protected]> Co-authored-by: Johannes Vogel <[email protected]> Co-authored-by: sjvans <[email protected]> Co-authored-by: Heiko Witteborg <[email protected]> Co-authored-by: ecklie <[email protected]> Co-authored-by: Andre Meyering <[email protected]> Co-authored-by: Dr. David A. Kunz <[email protected]> Co-authored-by: Arley Triana Morin <[email protected]> Co-authored-by: Daniel Hutzel <[email protected]> Co-authored-by: rashmiangadi11 <[email protected]> Co-authored-by: Mahati Shankar <[email protected]> Co-authored-by: Mahati Shankar <[email protected]> Co-authored-by: Lothar Bender <[email protected]> Co-authored-by: DJ Adams <[email protected]> Co-authored-by: Daniel O'Grady <[email protected]> Co-authored-by: mariayord <[email protected]> Co-authored-by: Markus Haug <[email protected]> Co-authored-by: Robin <[email protected]> Co-authored-by: BraunMatthias <[email protected]> Co-authored-by: Thomas Bonk <[email protected]> Co-authored-by: Thomas Bonk <[email protected]> Co-authored-by: Gopal Anand <[email protected]> Co-authored-by: Patrice Bender <[email protected]> Co-authored-by: Olena <[email protected]> Co-authored-by: D070615 <[email protected]> Co-authored-by: Marten Schiwek <[email protected]> Co-authored-by: simonoswald <[email protected]> Co-authored-by: RoshniNaveenaS <[email protected]> Co-authored-by: Matthias Kuhr <[email protected]>
1 parent b1caf8c commit f77e8f0

File tree

101 files changed

+2110
-1599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2110
-1599
lines changed

.github/workflows/PR-SAP.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929
GH_TOKEN_PARENT: ${{ secrets.GH_TOKEN_PARENT }}
3030
- name: Use Node.js
31-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
3232
with:
3333
node-version: 18.x
3434
cache: 'npm'

.github/workflows/PR.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
- name: Use Node.js
17-
uses: actions/setup-node@v3
17+
uses: actions/setup-node@v4
1818
with:
1919
node-version: 18.x
2020
cache: 'npm'

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3030
GH_TOKEN_PARENT: ${{ secrets.GH_TOKEN_PARENT }}
3131
- name: Use Node.js
32-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3333
with:
3434
node-version: 18.x
3535
cache: 'npm'

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929
- name: Setup Pages
30-
uses: actions/configure-pages@v3
30+
uses: actions/configure-pages@v5
3131
- name: Use Node.js
32-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3333
with:
3434
node-version: 18.x
3535
cache: 'npm'

.vitepress/config.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import * as MdAttrsPropagate from './lib/md-attrs-propagate'
1111
export type CapireThemeConfig = DefaultTheme.Config & {
1212
capire: {
1313
versions: { [key: string]: string },
14-
gotoLinks: { href:string, key:string, name?:string, hidden?:boolean }[]
14+
gotoLinks: { href:string, key:string, name?:string, hidden?:boolean }[],
15+
maven_host_base: string
1516
}
1617
}
1718

@@ -22,8 +23,8 @@ if (!siteURL.pathname.endsWith('/')) siteURL.pathname += '/'
2223
const redirectLinks: Record<string, string> = {}
2324

2425
const latestVersions = {
25-
java_services: '2.10.0',
26-
java_cds4j: '2.10.0'
26+
java_services: '3.0.0',
27+
java_cds4j: '3.0.0'
2728
}
2829

2930
const localSearchOptions = {
@@ -74,7 +75,7 @@ const localSearchOptions = {
7475
} as { provider: 'local'; options?: DefaultTheme.LocalSearchOptions }
7576

7677
const menu = sidebar()
77-
const nav = nav4(menu) as DefaultTheme.NavItem[]
78+
const nav = nav4(menu) as DefaultTheme.NavItemWithLink[]
7879
const loadSyntax = async (file:string, name:string, alias:string=name):Promise<LanguageInput> => {
7980
const src = await fs.readFile(join(__dirname, file))
8081
const grammar:RawGrammar = JSON.parse(src.toString())
@@ -83,6 +84,7 @@ const loadSyntax = async (file:string, name:string, alias:string=name):Promise<L
8384

8485
const config:UserConfig<CapireThemeConfig> = {
8586
title: 'cap≽ire',
87+
titleTemplate: ':title | capire', // for the window title
8688
description: 'Documentation for SAP Cloud Application Programming Model',
8789
base,
8890
srcExclude: ['**/.github/**', '**/README.md', '**/LICENSE.md', '**/CONTRIBUTING.md', '**/CODE_OF_CONDUCT.md', '**/menu.md', '**/-*.md'],
@@ -112,7 +114,11 @@ const config:UserConfig<CapireThemeConfig> = {
112114
{icon: 'github', link: 'https://github.com/cap-js/docs'}
113115
],
114116
outline: [2,3],
115-
capire: { versions: latestVersions, gotoLinks: [] }
117+
capire: {
118+
versions: latestVersions,
119+
gotoLinks: [],
120+
maven_host_base: 'https://repo1.maven.org/maven2'
121+
}
116122
},
117123
head: [
118124
['meta', { name: 'theme-color', content: '#db8b0b' }],

.vitepress/lib/cds-maven-site.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import AdmZip from 'adm-zip'
44
export async function copySiteAssets(outDir:string, site:SiteData) {
55
const { themeConfig: { capire }} = site
66
const version = capire.versions.java_services
7-
const url = `https://repo1.maven.org/maven2/com/sap/cds/cds-maven-plugin/${version}/cds-maven-plugin-${version}-site.jar`
7+
const url = capire.maven_host_base + `/com/sap/cds/cds-maven-plugin/${version}/cds-maven-plugin-${version}-site.jar`
88

99
const resp = await fetch(url)
1010
const jar = await resp.arrayBuffer()

.vitepress/theme/components/Since.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Badge type="info" :text="`requires ${of} ${version}`" :title="`This feature is only available as of ${of} version ${version} or higher.`" />
2+
<Badge type="info" :text="`since ${of} ${version}`" :title="`This feature is only available as of ${of} version ${version} or higher.`" />
33
</template>
44

55
<script setup lang="ts">

.vitepress/theme/custom.scss

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ main {
113113
pre.log {
114114
font-size: var(--vp-code-font-size);
115115
line-height: var(--vp-code-line-height);
116+
background: var(--vp-code-block-bg);
116117
padding: 12px 22px !important;
117118
overflow-x: auto;
118119
margin: 16px -24px; // same negative margin technique is used in Vitepress
@@ -151,13 +152,14 @@ main {
151152
i {
152153
color: grey;
153154
}
154-
155-
background: var(--vp-code-block-bg);
156155
}
157156

158157
.line-numbers-wrapper {
159158
padding-top: 13px; // align with code line height
160159
}
160+
161+
// code blocks without background, e.g. as sole values in table cells
162+
:not(pre) code.no-bg { background-color: initial; }
161163
}
162164

163165
// Table of Contents
@@ -185,12 +187,12 @@ main {
185187
border-width: 0 0 0 7px;
186188
border-radius: 14px;
187189
&.tip {
188-
&, & code, & a { color: #041 };
189190
background-color: #dfe;
190191
border-color: #096;
192+
&, & code, & a { color: #041 };
191193
.dark & {
192-
&, & code, & a { color: #ced; }
193194
background-color: #021;
195+
&, & code, & a { color: #ced; }
194196
}
195197
}
196198
&.info {
@@ -199,21 +201,21 @@ main {
199201
}
200202
}
201203
&.warning {
202-
&, & code, & a { color: #960; }
203204
background-color: #fff7f0;
204205
border-color: #ea0;
206+
&, & code, & a { color: #960; }
205207
.dark & {
206-
&, & code, & a { color: #ea0; }
207208
background-color: #210;
209+
&, & code, & a { color: #ea0; }
208210
}
209211
}
210212
&.danger {
211-
&, & code, & a { color: #600; }
212213
background-color: #fee;
213214
border-color: #900;
215+
&, & code, & a { color: #600; }
214216
.dark & {
215-
&, & code, & a { color: #fcc; }
216217
background-color: #300;
218+
&, & code, & a { color: #fcc; }
217219
}
218220
}
219221
a {
@@ -252,6 +254,8 @@ main {
252254
.event::before { content: 'Event: '; color: #999 }
253255
.class::before { content: 'Class: '; color: #999 }
254256
.async-method::before { content: 'Method: async '; color: #999 }
257+
.deprecated::after { content: ' – deprecated'; color: #999 }
258+
255259
h3.event, h3.method, h3.async-method {
256260
margin-top: 5em;
257261
// font-size: 22px;
@@ -338,11 +342,11 @@ kbd {
338342
}
339343

340344
.learn-more {
341-
&, & a { color: #999 !important; .dark & { color: #777 !important }};
342345
font-style: italic;
343346
margin-top: -5px;
344347
margin-bottom: 5px;
345348
display: block;
349+
&, & a { color: #999 !important; .dark & { color: #777 !important }};
346350

347351
&::before {
348352
content: url('/images/learn-more.svg');
@@ -402,8 +406,7 @@ html.node .java {
402406

403407
// make sidebar content scroll nicely underneath the logo
404408
@media (min-width: 960px) {
405-
header .title {
409+
.VPNavBar .has-sidebar > .title {
406410
background-color: var(--vp-sidebar-bg-color);
407411
}
408412
}
409-

about/features.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Following is an index of the features currently covered by CAP, with status and
223223
| [Draft Support](../advanced/fiori#draft-support) | <X/> | <X/> | <X/> |
224224
| [Draft for Localized Data](../advanced/fiori#draft-for-localized-data) | <X/> | <X/> | <X/> |
225225
| [Support for Fiori Analytics](../advanced/analytics) | <X/> | <D/> | <X/> |
226-
| [Support for other UI technologies, e.g. Vue.js](../get-started/in-a-nutshell#vue) <sup>1</sup> | <X/> | <X/> | <X/> |
226+
| [Support for other UI technologies, for example Vue.js](../get-started/in-a-nutshell#vue) <sup>1</sup> | <X/> | <X/> | <X/> |
227227

228228
> <sup>1</sup> through standard REST/AJAX
229229
@@ -259,5 +259,4 @@ Following is an index of the features currently covered by CAP, with status and
259259
| Declarative Constraints | <O/> |
260260
| Execute Sandboxed Code | <O/> |
261261
| Runtime API for In-App Extensibility | <D/> |
262-
| [Key-User Extensibility (incl. UI)](../guides/extensibility/ui-flex) | <D/> |
263262
| Propagating Extensions across (µ) Services | <O/> |

about/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ CAP-based projects benefit from a **[primary focus on domain](#domain-modeling)*
3636

3737
The CAP framework features a mix of proven and broadly adopted open-source and SAP technologies, as highlighted in the figure below.
3838

39-
<img src="../assets/overview.drawio.svg" style="width:480px; margin: auto" alt="The graphic is explained in the accompanying text.">
39+
![The graphic is explained in the accompanying text.](../assets/overview.drawio.svg){style="width:480px; margin: auto"}
4040

4141
<div id="logos" style="text-align:center;">
4242
<img src="../assets/logos/nodejs.svg" style="height:40px" alt="Node.js logo" />
@@ -310,7 +310,7 @@ All behavioral aspects in CAP are based on ubiquitous notions of [Services](#ser
310310
Services in CAP are **stateless** and with a **minimal footprint**, which allows you to modularize solutions into single-purposed (nano) services or functions-as-a-service.
311311

312312
<figure>
313-
<img src="../assets/agnostic-services.drawio.svg" width="333px">
313+
<img src="../assets/agnostic-services.drawio.svg" width="333px">
314314
<figcaption><a href="#hexagonal-architecture">Hexagonal Architecture à la CAP</a></figcaption>
315315
</figure>
316316

@@ -396,7 +396,7 @@ cds.service.impl (function(){
396396

397397

398398
// Emitting Events
399-
// e.g. in this.on ('cancelOrder', ...)
399+
// in this.on ('cancelOrder', ...)
400400
let { ID } = req.data
401401
this.emit ('orderCancelled', {ID})
402402

advanced/analytics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ You can use the following aggregations: `#SUM`, `#MAX`, `#MIN`, `#AVG`, `#COUNT_
6464
### Introduction
6565

6666
An application can implement the Cloud Data Integration (CDI) protocol for exposing its data,
67-
e.g. to act as a data provider for Data Plane Services (DPS).
67+
for example, to act as a data provider for Data Plane Services (DPS).
6868
Basically, this means that the app has to provide a set of OData V4 services as described
6969
in the [CDI specification](https://github.tools.sap/DataPlane/cloud-data-integration-specification).
7070
This is easy to achieve for a CAP application, as CAP provides generic OData exposure based on CDS models.

advanced/fiori.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,11 @@ It is active by default, but disabled automatically in case the [production prof
6868
To also enable it in cloud deployments, for test or demo purposes maybe, add the following configuration:
6969

7070
::: code-group
71-
72-
```yaml [application.yaml]
71+
```yaml [srv/src/main/resources/application.yaml]
7372
cds:
7473
index-page:
7574
enabled: true
7675
```
77-
7876
:::
7977
8078
</div>
@@ -485,6 +483,50 @@ SELECT.from(Books.drafts) //returns all drafts of the Books entity
485483

486484
[Learn how to query drafts in Java.](../java/fiori-drafts#draftservices){.learn-more}
487485

486+
## Use Roles to Toggle Visibility of UI elements
487+
488+
In addition to adding [restrictions on services, entities, and actions/functions](/guides/security/authorization#restrictions), there are use cases where you only want to hide certain parts of the UI for specific users. This is possible by using the respective UI annotations like `@UI.Hidden` or `@UI.CreateHidden` in conjunction with `$edmJson` pointing to a singleton.
489+
490+
First, you define the [singleton](../advanced/odata#singletons) in your service and annotate it with [`@cds.persistency.skip`](../guides/databases#cds-persistence-skip) so that no database artefact is created:
491+
492+
```cds
493+
@odata.singleton @cds.persistency.skip
494+
entity Configuration {
495+
key ID: String;
496+
isAdmin : Boolean;
497+
}
498+
```
499+
> A key is technically not required, but without it some consumers might run into problems.
500+
501+
Then define an `on` handler for serving the request:
502+
503+
```js
504+
srv.on('READ', 'Configuration', async req => {
505+
req.reply({
506+
isAdmin: req.user.is('admin') //admin is the role, which for example is also used in @requires annotation
507+
});
508+
});
509+
```
510+
511+
Finally, refer to the singleton in the annotation by using a [dynamic expression](../advanced/odata#dynamic-expressions):
512+
513+
```cds
514+
annotate service.Books with @(
515+
UI.CreateHidden : { $edmJson: {$Not: { $Path: '/CatalogService.EntityContainer/Configuration/isAdmin'} } },
516+
UI.UpdateHidden : { $edmJson: {$Not: { $Path: '/CatalogService.EntityContainer/Configuration/isAdmin'} } },
517+
);
518+
```
519+
520+
The Entity Container is OData specific and refers to the `$metadata` of the OData service in which all accessible entities are located within the Entity Container.
521+
522+
:::details SAP Fiori elements also allows to not include it in the path
523+
```cds
524+
annotate service.Books with @(
525+
UI.CreateHidden : { $edmJson: {$Not: { $Path: '/Configuration/isAdmin'} } },
526+
UI.UpdateHidden : { $edmJson: {$Not: { $Path: '/Configuration/isAdmin'} } },
527+
);
528+
```
529+
:::
488530

489531
## Value Helps
490532

advanced/hybrid-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Example output:
283283

284284
With `cds bind` you avoid storing credentials on your hard disk. If you need to start other local applications with cloud service bindings, you can use the `exec` option.
285285

286-
For example, you can run the approuter from an `approuter` child directory:
286+
For example, you can run the App Router from an `approuter` child directory:
287287

288288
::: code-group
289289
```sh [Mac/Linux]
@@ -465,7 +465,7 @@ cds bind --exec [--] <command> <args ...>
465465

466466
Use the double-dash (`--`) if your command has args starting with a dash (`-`) character. Otherwise the `cds` command line will try to parse them as their own options.
467467

468-
On PowerShell you need to quote the double dash (`--`) when an option with double dash follows, e.g.
468+
On PowerShell you need to quote the double dash (`--`) when an option with double dash follows:
469469

470470
```powershell
471471
cds bind --exec '--' somecmd --someflag --some-double-dash-parameter 42

advanced/odata.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ status: released
2424

2525
# Serving OData APIs
2626

27+
[[toc]]
28+
2729
## Feature Overview { #overview}
2830

2931
OData is an OASIS standard, which essentially enhances plain REST with standardized system query options like `$select`, `$expand`, `$filter`, etc. Find a rough overview of the feature coverage in the following table:
@@ -1201,12 +1203,14 @@ The cds build for OData v4 will render the entity type `Book` in `edmx` with the
12011203
</EntityType>
12021204
```
12031205

1204-
The entity `Book` is open, allowing the client to enrich the entity with additional properties, e.g.:
1206+
The entity `Book` is open, allowing the client to enrich the entity with additional properties.
1207+
1208+
Example 1:
12051209

12061210
```json
12071211
{"id": 1, "title": "Tow Sawyer"}
12081212
```
1209-
or
1213+
Example 2:
12101214

12111215
```json
12121216
{"title": "Tow Sawyer",
@@ -1226,7 +1230,7 @@ service CatalogService {
12261230
type Book {} // [!code focus]
12271231
}
12281232
```
1229-
Following payload for `Order` is allowed:
1233+
The following payload for `Order` is allowed:
12301234

12311235
`{"guid": 1, "book": {"id": 2, "title": "Tow Sawyer"}}`
12321236

@@ -1236,11 +1240,6 @@ Note that type `Order` itself is not open thus doesn't allow dynamic properties,
12361240
Dynamic properties are not persisted in the underlying data source automatically and must be handled completely by custom code.
12371241
:::
12381242

1239-
::: warning
1240-
The full support of Open Types (`@open`) in OData is currently available for the Java Runtime only.
1241-
The Node.js runtime currently only supports the feature for actions via REST. Full support will be available in the new OData adapter in `@sap/cds^8`.
1242-
:::
1243-
12441243
### Java Type Mapping
12451244

12461245
#### Simple Types

advanced/publishing-apis/asyncapi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ status: released
2222

2323
You can convert events in CDS models to the [AsyncAPI specification](https://www.asyncapi.com), a widely adopted standard used to describe and document message-driven asynchronous APIs.
2424

25+
[[toc]]
2526

2627
## Usage from CLI { #cli}
2728

0 commit comments

Comments
 (0)