Skip to content

Major Release June 2024 #1102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 147 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
c231c37
replace `npm add` with `npm install -D` for typescript setup (#986)
ziyang-works Jun 10, 2024
31f85bd
Fix bg-color of title on home page
chgeo Jun 10, 2024
997529d
[CAPJAVA^3] Fix the wrong precondition in the list (#983)
vmikhailenko Jun 10, 2024
eea52f9
fix CDL
renejeglinsky Jun 10, 2024
23694fb
Explain PostgreSQL limitations (#974)
mofterdinger Jun 10, 2024
c6d4a54
Mention that draft decorations can't be used in annotation expression…
hjboth Jun 10, 2024
6672dc4
fix cdl
renejeglinsky Jun 10, 2024
6517102
Merge branch 'main' of https://github.com/cap-js/docs
renejeglinsky Jun 10, 2024
f2790d6
.
renejeglinsky Jun 10, 2024
03c60f6
clearer beginning for beginners
renejeglinsky Jun 10, 2024
cffdca8
Remove docs about obsolete K8s service bindings config (#991)
beckermarc Jun 12, 2024
5306d44
Remove obsolete tip in `cds.env` guide (#996)
swaldmann Jun 12, 2024
f4e2343
CDL: Added learn more about path annotation video (#995)
renejeglinsky Jun 12, 2024
7b4f3f7
Java Reflection API: Fix localized example (#999)
MattSchur Jun 12, 2024
8957778
XML to Markdown syntax on images (#997)
motaroberta Jun 12, 2024
1e2b9c5
consistent naming for App Router (#1002)
renejeglinsky Jun 13, 2024
e05fc9f
Update dependency com.sap.cds:cds4j-api to v2.10.1 (#1003)
renovate[bot] Jun 13, 2024
9cc365e
Update dependency sass to v1.77.5 (#992)
renovate[bot] Jun 13, 2024
25134d3
Update dependency @sap/cds-dk to v7.9.3 (#988)
renovate[bot] Jun 13, 2024
916fe4d
Data Privacy Updates (#945)
renejeglinsky Jun 13, 2024
faf4672
Update dependency com.sap.cds:cds-services-api to v2.10.1 (#1012)
renovate[bot] Jun 13, 2024
387364d
editing
renejeglinsky Jun 14, 2024
23bb275
Mermaid docs (#1014)
chgeo Jun 17, 2024
7116e37
doc(deploy): explain deploy --profile (#944)
joergmann Jun 17, 2024
c914b68
[cds^8] - Nodejs : rm req.user.<tenant/locale> compat (#953)
johannes-vogel Jun 17, 2024
98b3a40
[cds^8] No strings in INSERT.into and UPSERT.into (#966)
hm23 Jun 17, 2024
71ec6c5
doc(completion)(8.0): add fish shell entry (#989)
joergmann Jun 17, 2024
cf9da14
Remove cds.Subscriber from mock users (#1000)
ecklie Jun 17, 2024
a30d2c1
docs(java outbox): Show hard-coded value `ordered` for default outbox…
bugwelle Jun 18, 2024
b44fc73
fix(cds-env): Add missing newline in YAML snippet (#1021)
bugwelle Jun 18, 2024
c54e7f6
mention hdb_nodejs_threadpool_size (#1028)
David-Kunz Jun 18, 2024
c73064d
fix(java): Fix variable mismatch: `ctx` vs `context` (#1024)
bugwelle Jun 18, 2024
246f7a8
Remove CdsDataStore documentation from PersistenceService chapter (#1…
beckermarc Jun 19, 2024
a29263e
hard coded vs usr defined strlength (#1017)
hjboth Jun 19, 2024
b156a35
ci: Update `actions/configure-pages` to v5 (#1033)
bugwelle Jun 19, 2024
e4e378c
ci: Update `actions/checkout` to v4 (#1032)
bugwelle Jun 19, 2024
ba59772
ci: Update `actions/setup-node` to v4 (#1031)
bugwelle Jun 19, 2024
1445ecf
chore(deps): update dependency cspell to v8.9.0 (#1030)
renovate[bot] Jun 19, 2024
f0ffcfd
fix(observability): Fix snytax error in YAML snippets (#1022)
bugwelle Jun 19, 2024
602139e
chore(deps): update dependency sass to v1.77.6 (#1018)
renovate[bot] Jun 19, 2024
c885428
Complete table for `cds add` (#1029)
swaldmann Jun 19, 2024
565d8f0
docs(java): Add more newlines to improve readability of snippets (#1020)
bugwelle Jun 19, 2024
8dba169
docs(java outbox): Improve description for `.cdsrc.json` (#1019)
bugwelle Jun 19, 2024
d81960d
Update limitations of SQLite (#1026)
agoerler Jun 19, 2024
93fc476
Add Git Bash on Windows disclaimer (#1037)
arleytm Jun 19, 2024
4b6a004
docs(java): Fix syntax errors in Java snippets (#1035)
bugwelle Jun 20, 2024
fe20719
.
danjoa Jun 20, 2024
04c1b89
SAP Document Management Service Plugin Documentation (#1034)
rashmiangadi11 Jun 20, 2024
2dc3808
New index page style
chgeo Jun 20, 2024
5f011a5
Hint to Mermaid extension
chgeo Jun 20, 2024
25399f7
chore(deps): update dependency @sap/eslint-plugin-cds to v3.0.4 (#1038)
renovate[bot] Jun 20, 2024
656f028
chore(deps): update dependency cspell to v8.9.1 (#1041)
renovate[bot] Jun 20, 2024
ac85209
new command: cds compile --to hana (#1025)
LotharBender Jun 20, 2024
9e4fa12
SAP Document Management Service Plugin UI changes (#1044)
rashmiangadi11 Jun 21, 2024
5417f41
Enforce chai-as-promised 7
chgeo Jun 21, 2024
a0931df
Add full path to pom.xml in auditlog section. (#1048)
mofterdinger Jun 24, 2024
8d80edb
docs(Java): Remove unnecessary UML-like graphic (#1011)
bugwelle Jun 24, 2024
2f0fe28
Fix #1045 (#1046)
vmikhailenko Jun 24, 2024
18f1e0d
minor typo fix in core-services.md (#1051)
qmacro Jun 25, 2024
bbdd15a
fix typo and rearrange to avoid multiple plural-possessive-quotes in …
qmacro Jun 25, 2024
b176e5a
[cds^8] remove req._ (we have req.http now) (#741)
sjvans Jun 25, 2024
34664a1
Since instead of requires
danjoa Jun 26, 2024
e83dcd6
Update the FAQ for concurrency problems (#990)
vmikhailenko Jun 26, 2024
23a1550
Introduce placeholder for fragment (#1052)
vmikhailenko Jun 26, 2024
5489401
docs: Update Fiori screenshot to use the latest version (#1065)
bugwelle Jun 26, 2024
fcf3c91
docs(In a Nutshell): Mention path `/browse` in text also (#1063)
bugwelle Jun 26, 2024
ed29b13
docs(Grow As You Go): Add `--for production` to multitenancy step (#1…
bugwelle Jun 26, 2024
ee5e9c7
docs(Java): Add filenames to YAML snippets (#1059)
bugwelle Jun 26, 2024
b5825f6
docs(Java): Mention default mock user in getting started guide (#1061)
bugwelle Jun 26, 2024
fb57a33
Make Maven host configurable
chgeo Jun 26, 2024
e2dd7bf
docs(Java): Fix typos, grammar, and format snippets (#1058)
bugwelle Jun 27, 2024
828ab6d
fix link anchor
renejeglinsky Jun 27, 2024
2021ed1
Merge branch 'main' of https://github.com/cap-js/docs
renejeglinsky Jun 27, 2024
767ff23
No code bg as sole value in table cells
chgeo Jun 27, 2024
4c15523
Add orphaned Features page to sidebar
chgeo Jun 27, 2024
9bc6ceb
Replace semiofficial API `DELETE(Books).byKey(42)` with `DELETE.from(…
arleytm Jun 27, 2024
b5f8a2c
docs(Java Building Plugins): Format code, fix typos, snippet filename…
bugwelle Jun 27, 2024
87b21ff
Update cds-typer.md (#1057)
daogrady Jun 27, 2024
56a99e2
docs(Java): Adapt CQL counterparts: fix syntax (#1007)
bugwelle Jun 27, 2024
44e8612
Start a test server inside describe (#1068)
mariayord Jun 27, 2024
8ec4df4
Update learning-sources.md (#1049)
markushaug Jun 27, 2024
69a8ea5
docs(Java): Fix Intellij part: make it more generic (#1008)
bugwelle Jun 27, 2024
a77b8f5
fix(In a Nutshell): Fix class name for catalog service handler (#1066)
bugwelle Jun 27, 2024
0be17ce
Removed Beta from change-tracking.md (#1070)
BraunMatthias Jun 28, 2024
e486974
docs(Java): Remove file listings: they are error prone and outdated (…
bugwelle Jun 28, 2024
4a26b3c
troubleshooting: mention logging for cloud sdk (#1069)
David-Kunz Jun 28, 2024
59af473
Add requires section to observability mta example (#1074)
beckermarc Jul 1, 2024
8eef055
fix: it's not propagated from msg.id (#1053)
David-Kunz Jul 1, 2024
136779b
Always use `cds add xsuaa --for production`
swaldmann Jul 1, 2024
f6f9336
Migration Guide for CAP Java 3.0 (#892)
beckermarc Jul 1, 2024
d8da037
[3.x] cds-services-archetype improvements (#1013)
mofterdinger Jul 1, 2024
3008ac8
Add link to SAP Hana Cloud system limits (#1078)
hjboth Jul 2, 2024
0f529c4
removed outdated note
renejeglinsky Jul 2, 2024
63b435e
e.g. to for example (#1081)
renejeglinsky Jul 2, 2024
3923ef2
edit
renejeglinsky Jul 2, 2024
d77e235
docs(Java): Update link to GraalVM guide (#1082)
bugwelle Jul 2, 2024
0241a33
Update learning-sources.md (#1075)
gopalanand333 Jul 4, 2024
e5fb4a2
chore(deps): update dependency cspell to v8.10.0 (#1084)
renovate[bot] Jul 4, 2024
c323e5c
chore(deps): update dependency eslint-plugin-vue to v9.27.0 (#1080)
renovate[bot] Jul 4, 2024
13fdaed
chore(deps): update dependency @sap/cds to v7.9.3 (#1071)
renovate[bot] Jul 4, 2024
25255c9
chore(deps): update dependency @sap/cds-mtxs to v1.18.2 (#1055)
renovate[bot] Jul 4, 2024
2d3dc1a
chore(deps): update dependency com.sap.cds:cds-services-api to v2.10.…
renovate[bot] Jul 4, 2024
c1a0195
chore(deps): update dependency @sap/cds-dk to v7.9.4 (#1040)
renovate[bot] Jul 4, 2024
df62370
typo
renejeglinsky Jul 5, 2024
20885d3
Merge branch 'main' of https://github.com/cap-js/docs
renejeglinsky Jul 5, 2024
da5be98
Clearer CDS/CDL (#1076)
renejeglinsky Jul 5, 2024
31d8bd0
Fix link to `compile` options (#1086)
chgeo Jul 5, 2024
bad0605
cosmetics
smahati Jul 5, 2024
c4d7fdb
chore(deps): update dependency cspell to v8.10.4 (#1087)
renovate[bot] Jul 8, 2024
a5d3ec9
chore(deps): update dependency vitepress to v1.3.0 (#1088)
renovate[bot] Jul 8, 2024
4e48eab
Avoid `cap>=ire` in the window title (#1089)
chgeo Jul 9, 2024
92c5e79
Remove abstract services example (#1090)
MattSchur Jul 9, 2024
094a88e
fix learn more link
renejeglinsky Jul 9, 2024
38bd7bc
Merge branch 'main' of https://github.com/cap-js/docs
renejeglinsky Jul 9, 2024
6cbed21
feat: deep search is available for nodejs (#1091)
patricebender Jul 10, 2024
ed87c77
[cds^8]: remove deprecated api srv. stream (#998)
etimr Jul 10, 2024
8c8dea8
[cds^8] telemetry plugin: remove beta flag (#1001)
sjvans Jul 10, 2024
4ebeb33
Added section to describe how parts of the UI can be hidden based on …
schiwekM Jul 10, 2024
1c8a2c0
SDM plugin menu (#1095)
rashmiangadi11 Jul 10, 2024
7bc8a07
Java: Fix bulk insert example (#1099)
MattSchur Jul 11, 2024
e9368a5
Update many to many relation example (#1093)
schiwekM Jul 11, 2024
5ec7692
removed outdated link
renejeglinsky Jul 12, 2024
150b737
WIP: .hdbcds to .hdbtable migration guide (#825)
simonoswald Jul 12, 2024
8a548d6
CAP Plugin: cap-js ord plugin (#1064)
RoshniNaveenaS Jul 12, 2024
e7698f9
[cds^8] cds.middlewares.before (#1094)
sjvans Jul 12, 2024
68b8ba0
cds8: switch on garbage collection of stale drafts by default (#929)
johannes-vogel Jul 12, 2024
964ce28
[cds^8] Node.js - rm legacy config for draft locks (#896)
johannes-vogel Jul 12, 2024
89eb3c6
Destination caching is enabled by default (#1016)
mariayord Jul 12, 2024
567fafa
ORD Plugin reorder (#1103)
RoshniNaveenaS Jul 12, 2024
b999808
fix link
renejeglinsky Jul 12, 2024
0323178
release page
renejeglinsky Jul 12, 2024
9ec8c04
Remove link to internal fragment for now
chgeo Jul 12, 2024
b1fd855
Fix element reference in CQN example on avoiding SQL injection (#1104)
qmacro Jul 12, 2024
8cfab16
chore(deps): update dependency @sap/cds-compiler to v5 (#1101)
renovate[bot] Jul 14, 2024
c912798
chore(deps): update dependency @sap/cds to v8 (#1106)
renovate[bot] Jul 14, 2024
d2852e0
chore(deps): update dependency @sap/cds-dk to v8 (#1108)
renovate[bot] Jul 14, 2024
d07ad5f
chore(deps): update dependency @sap/cds-mtxs to v2 (#1107)
renovate[bot] Jul 14, 2024
10ae4e8
chore(deps): update dependency sass to v1.77.8 (#1092)
renovate[bot] Jul 14, 2024
0d7891f
chore(deps): update dependency vitepress to v1.3.1 (#1109)
renovate[bot] Jul 14, 2024
df063b6
Merge branch 'cap.cloud.sap' into main
chgeo Jul 14, 2024
2c95084
Move ORD plugin down, adjust screeshot
chgeo Jul 14, 2024
8daf91e
Adjust menu for SDM, ORD
chgeo Jul 14, 2024
c36cbef
Fix warnings from scss plugin
chgeo Jul 14, 2024
f5ad674
chore(deps): update dependency com.sap.cds:cds4j-api to v3 (#1110)
renovate[bot] Jul 15, 2024
6b78f9e
chore(deps): update dependency com.sap.cds:cds-services-api to v3 (#1…
renovate[bot] Jul 15, 2024
55b76a4
Minor Fix in Java Remote Services Docs (#1113)
MatKuhr Jul 16, 2024
0c93f3a
HEX mode is default (#1112)
agoerler Jul 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/PR-SAP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN_PARENT: ${{ secrets.GH_TOKEN_PARENT }}
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN_PARENT: ${{ secrets.GH_TOKEN_PARENT }}
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
Expand Down
16 changes: 11 additions & 5 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import * as MdAttrsPropagate from './lib/md-attrs-propagate'
export type CapireThemeConfig = DefaultTheme.Config & {
capire: {
versions: { [key: string]: string },
gotoLinks: { href:string, key:string, name?:string, hidden?:boolean }[]
gotoLinks: { href:string, key:string, name?:string, hidden?:boolean }[],
maven_host_base: string
}
}

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

const latestVersions = {
java_services: '2.10.0',
java_cds4j: '2.10.0'
java_services: '3.0.0',
java_cds4j: '3.0.0'
}

const localSearchOptions = {
Expand Down Expand Up @@ -74,7 +75,7 @@ const localSearchOptions = {
} as { provider: 'local'; options?: DefaultTheme.LocalSearchOptions }

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

const config:UserConfig<CapireThemeConfig> = {
title: 'cap≽ire',
titleTemplate: ':title | capire', // for the window title
description: 'Documentation for SAP Cloud Application Programming Model',
base,
srcExclude: ['**/.github/**', '**/README.md', '**/LICENSE.md', '**/CONTRIBUTING.md', '**/CODE_OF_CONDUCT.md', '**/menu.md', '**/-*.md'],
Expand Down Expand Up @@ -112,7 +114,11 @@ const config:UserConfig<CapireThemeConfig> = {
{icon: 'github', link: 'https://github.com/cap-js/docs'}
],
outline: [2,3],
capire: { versions: latestVersions, gotoLinks: [] }
capire: {
versions: latestVersions,
gotoLinks: [],
maven_host_base: 'https://repo1.maven.org/maven2'
}
},
head: [
['meta', { name: 'theme-color', content: '#db8b0b' }],
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/lib/cds-maven-site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import AdmZip from 'adm-zip'
export async function copySiteAssets(outDir:string, site:SiteData) {
const { themeConfig: { capire }} = site
const version = capire.versions.java_services
const url = `https://repo1.maven.org/maven2/com/sap/cds/cds-maven-plugin/${version}/cds-maven-plugin-${version}-site.jar`
const url = capire.maven_host_base + `/com/sap/cds/cds-maven-plugin/${version}/cds-maven-plugin-${version}-site.jar`

const resp = await fetch(url)
const jar = await resp.arrayBuffer()
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/Since.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<Badge type="info" :text="`requires ${of} ${version}`" :title="`This feature is only available as of ${of} version ${version} or higher.`" />
<Badge type="info" :text="`since ${of} ${version}`" :title="`This feature is only available as of ${of} version ${version} or higher.`" />
</template>

<script setup lang="ts">
Expand Down
25 changes: 14 additions & 11 deletions .vitepress/theme/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ main {
pre.log {
font-size: var(--vp-code-font-size);
line-height: var(--vp-code-line-height);
background: var(--vp-code-block-bg);
padding: 12px 22px !important;
overflow-x: auto;
margin: 16px -24px; // same negative margin technique is used in Vitepress
Expand Down Expand Up @@ -151,13 +152,14 @@ main {
i {
color: grey;
}

background: var(--vp-code-block-bg);
}

.line-numbers-wrapper {
padding-top: 13px; // align with code line height
}

// code blocks without background, e.g. as sole values in table cells
:not(pre) code.no-bg { background-color: initial; }
}

// Table of Contents
Expand Down Expand Up @@ -185,12 +187,12 @@ main {
border-width: 0 0 0 7px;
border-radius: 14px;
&.tip {
&, & code, & a { color: #041 };
background-color: #dfe;
border-color: #096;
&, & code, & a { color: #041 };
.dark & {
&, & code, & a { color: #ced; }
background-color: #021;
&, & code, & a { color: #ced; }
}
}
&.info {
Expand All @@ -199,21 +201,21 @@ main {
}
}
&.warning {
&, & code, & a { color: #960; }
background-color: #fff7f0;
border-color: #ea0;
&, & code, & a { color: #960; }
.dark & {
&, & code, & a { color: #ea0; }
background-color: #210;
&, & code, & a { color: #ea0; }
}
}
&.danger {
&, & code, & a { color: #600; }
background-color: #fee;
border-color: #900;
&, & code, & a { color: #600; }
.dark & {
&, & code, & a { color: #fcc; }
background-color: #300;
&, & code, & a { color: #fcc; }
}
}
a {
Expand Down Expand Up @@ -252,6 +254,8 @@ main {
.event::before { content: 'Event: '; color: #999 }
.class::before { content: 'Class: '; color: #999 }
.async-method::before { content: 'Method: async '; color: #999 }
.deprecated::after { content: ' – deprecated'; color: #999 }

h3.event, h3.method, h3.async-method {
margin-top: 5em;
// font-size: 22px;
Expand Down Expand Up @@ -338,11 +342,11 @@ kbd {
}

.learn-more {
&, & a { color: #999 !important; .dark & { color: #777 !important }};
font-style: italic;
margin-top: -5px;
margin-bottom: 5px;
display: block;
&, & a { color: #999 !important; .dark & { color: #777 !important }};

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

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

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

> <sup>1</sup> through standard REST/AJAX

Expand Down Expand Up @@ -259,5 +259,4 @@ Following is an index of the features currently covered by CAP, with status and
| Declarative Constraints | <O/> |
| Execute Sandboxed Code | <O/> |
| Runtime API for In-App Extensibility | <D/> |
| [Key-User Extensibility (incl. UI)](../guides/extensibility/ui-flex) | <D/> |
| Propagating Extensions across (µ) Services | <O/> |
6 changes: 3 additions & 3 deletions about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CAP-based projects benefit from a **[primary focus on domain](#domain-modeling)*

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

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

<div id="logos" style="text-align:center;">
<img src="../assets/logos/nodejs.svg" style="height:40px" alt="Node.js logo" />
Expand Down Expand Up @@ -310,7 +310,7 @@ All behavioral aspects in CAP are based on ubiquitous notions of [Services](#ser
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.

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

Expand Down Expand Up @@ -396,7 +396,7 @@ cds.service.impl (function(){


// Emitting Events
// e.g. in this.on ('cancelOrder', ...)
// in this.on ('cancelOrder', ...)
let { ID } = req.data
this.emit ('orderCancelled', {ID})

Expand Down
2 changes: 1 addition & 1 deletion advanced/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ You can use the following aggregations: `#SUM`, `#MAX`, `#MIN`, `#AVG`, `#COUNT_
### Introduction

An application can implement the Cloud Data Integration (CDI) protocol for exposing its data,
e.g. to act as a data provider for Data Plane Services (DPS).
for example, to act as a data provider for Data Plane Services (DPS).
Basically, this means that the app has to provide a set of OData V4 services as described
in the [CDI specification](https://github.tools.sap/DataPlane/cloud-data-integration-specification).
This is easy to achieve for a CAP application, as CAP provides generic OData exposure based on CDS models.
Expand Down
48 changes: 45 additions & 3 deletions advanced/fiori.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,11 @@ It is active by default, but disabled automatically in case the [production prof
To also enable it in cloud deployments, for test or demo purposes maybe, add the following configuration:

::: code-group

```yaml [application.yaml]
```yaml [srv/src/main/resources/application.yaml]
cds:
index-page:
enabled: true
```

:::

</div>
Expand Down Expand Up @@ -485,6 +483,50 @@ SELECT.from(Books.drafts) //returns all drafts of the Books entity

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

## Use Roles to Toggle Visibility of UI elements

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.

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:

```cds
@odata.singleton @cds.persistency.skip
entity Configuration {
key ID: String;
isAdmin : Boolean;
}
```
> A key is technically not required, but without it some consumers might run into problems.

Then define an `on` handler for serving the request:

```js
srv.on('READ', 'Configuration', async req => {
req.reply({
isAdmin: req.user.is('admin') //admin is the role, which for example is also used in @requires annotation
});
});
```

Finally, refer to the singleton in the annotation by using a [dynamic expression](../advanced/odata#dynamic-expressions):

```cds
annotate service.Books with @(
UI.CreateHidden : { $edmJson: {$Not: { $Path: '/CatalogService.EntityContainer/Configuration/isAdmin'} } },
UI.UpdateHidden : { $edmJson: {$Not: { $Path: '/CatalogService.EntityContainer/Configuration/isAdmin'} } },
);
```

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.

:::details SAP Fiori elements also allows to not include it in the path
```cds
annotate service.Books with @(
UI.CreateHidden : { $edmJson: {$Not: { $Path: '/Configuration/isAdmin'} } },
UI.UpdateHidden : { $edmJson: {$Not: { $Path: '/Configuration/isAdmin'} } },
);
```
:::

## Value Helps

Expand Down
4 changes: 2 additions & 2 deletions advanced/hybrid-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Example output:

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.

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

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

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.

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

```powershell
cds bind --exec '--' somecmd --someflag --some-double-dash-parameter 42
Expand Down
15 changes: 7 additions & 8 deletions advanced/odata.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ status: released

# Serving OData APIs

[[toc]]

## Feature Overview { #overview}

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:
Expand Down Expand Up @@ -1201,12 +1203,14 @@ The cds build for OData v4 will render the entity type `Book` in `edmx` with the
</EntityType>
```

The entity `Book` is open, allowing the client to enrich the entity with additional properties, e.g.:
The entity `Book` is open, allowing the client to enrich the entity with additional properties.

Example 1:

```json
{"id": 1, "title": "Tow Sawyer"}
```
or
Example 2:

```json
{"title": "Tow Sawyer",
Expand All @@ -1226,7 +1230,7 @@ service CatalogService {
type Book {} // [!code focus]
}
```
Following payload for `Order` is allowed:
The following payload for `Order` is allowed:

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

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

::: warning
The full support of Open Types (`@open`) in OData is currently available for the Java Runtime only.
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`.
:::

### Java Type Mapping

#### Simple Types
Expand Down
1 change: 1 addition & 0 deletions advanced/publishing-apis/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ status: released

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.

[[toc]]

## Usage from CLI { #cli}

Expand Down
Loading
Loading