Skip to content

Commit b1caf8c

Browse files
Merge pull request #982 from cap-js/main
May Release
2 parents b8ff918 + 6b7ee79 commit b1caf8c

Some content is hidden

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

63 files changed

+2436
-914
lines changed

.github/renovate.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"includePaths": [
99
".vitepress/config.ts",
1010
".github/workflows/",
11-
"package.json"
11+
"package.json",
12+
"**/*.md"
1213
],
1314
"packageRules": [
1415
{
@@ -27,10 +28,15 @@
2728
{
2829
"matchDepTypes": ["action"],
2930
"groupName": "Github actions"
31+
},
32+
{
33+
"matchFileNames": [ "**/*.md" ],
34+
"separateMajorMinor": false
3035
}
3136
],
32-
"regexManagers": [
37+
"customManagers": [
3338
{
39+
"customType": "regex",
3440
"fileMatch": [ ".vitepress/config.ts" ],
3541
"matchStrings": [
3642
"java_services\\s*:\\s*'(?<currentValue>.*?)'"
@@ -40,6 +46,7 @@
4046
"versioningTemplate": "maven"
4147
},
4248
{
49+
"customType": "regex",
4350
"fileMatch": [ ".vitepress/config.ts" ],
4451
"matchStrings": [
4552
"java_cds4j\\s*:\\s*'(?<currentValue>.*?)'"
@@ -49,6 +56,7 @@
4956
"versioningTemplate": "maven"
5057
},
5158
{
59+
"customType": "regex",
5260
"fileMatch": ["\\.md$"],
5361
"matchStrings": [
5462
"<em>\\s*@sap/cds:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
@@ -58,6 +66,7 @@
5866
"datasourceTemplate": "npm"
5967
},
6068
{
69+
"customType": "regex",
6170
"fileMatch": ["\\.md$"],
6271
"matchStrings": [
6372
"<em>\\s*@sap/cds-compiler:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
@@ -67,6 +76,7 @@
6776
"datasourceTemplate": "npm"
6877
},
6978
{
79+
"customType": "regex",
7080
"fileMatch": ["\\.md$"],
7181
"matchStrings": [
7282
"<em>\\s*@sap/cds-dk:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
@@ -76,6 +86,7 @@
7686
"datasourceTemplate": "npm"
7787
},
7888
{
89+
"customType": "regex",
7990
"fileMatch": ["\\.md$"],
8091
"matchStrings": [
8192
"<em>\\s*@sap/cds-mtxs:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
@@ -85,6 +96,7 @@
8596
"datasourceTemplate": "npm"
8697
},
8798
{
99+
"customType": "regex",
88100
"fileMatch": ["\\.md$"],
89101
"matchStrings": [
90102
"<em>\\s*@sap/eslint-plugin-cds:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
@@ -94,6 +106,7 @@
94106
"datasourceTemplate": "npm"
95107
},
96108
{
109+
"customType": "regex",
97110
"fileMatch": ["\\.md$"],
98111
"matchStrings": [
99112
"<em>\\s*Node.js:\\s*</em>\\s*(?<currentValue>v\\d+\\.\\d+\\.\\d+)",

.vitepress/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ if (!siteURL.pathname.endsWith('/')) siteURL.pathname += '/'
2222
const redirectLinks: Record<string, string> = {}
2323

2424
const latestVersions = {
25-
java_services: '2.9.0',
26-
java_cds4j: '2.9.0'
25+
java_services: '2.10.0',
26+
java_cds4j: '2.10.0'
2727
}
2828

2929
const localSearchOptions = {

.vitepress/theme/Layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const { frontmatter } = useData()
5959
margin-left: auto;
6060
}
6161
62-
@media (max-width: 768px) {
62+
@media (max-width: 960px) {
6363
.ImplVariantsInNavbar {
6464
display: none;
6565
}

.vitepress/theme/custom.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ main {
129129
color: #032F62;
130130
.dark & { color: #9ECBFF; }
131131
}
132-
&.flags {
132+
&.flags, &.option, &.posArg {
133133
color: #005CC5;
134134
.dark & { color: #79B8FF; }
135135
}
@@ -399,3 +399,11 @@ html.node .java {
399399
@media (min-width: 1024px) {
400400
.VPNavBarSearch { padding-left: 12px; }
401401
}
402+
403+
// make sidebar content scroll nicely underneath the logo
404+
@media (min-width: 960px) {
405+
header .title {
406+
background-color: var(--vp-sidebar-bg-color);
407+
}
408+
}
409+

about/features.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Following is an index of the features currently covered by CAP, with status and
4040
| CLI commands | |
4141
|---------------------------------------------------------------------------------|----------------------------|
4242
| [Jump-start cds-based projects](../get-started/in-a-nutshell#jumpstart) | `cds init <project>` |
43-
| Add a feature to an existing project | `cds add <facets>` |
43+
| [Add a feature to an existing project](../tools/cds-cli#cds-add) | `cds add <facets>` |
4444
| [Add models from external sources](../guides/using-services#local-mocking) | `cds import <api>` |
4545
| [Compile cds models to different outputs](../node.js/cds-compile) | `cds compile <models>` |
4646
| [Run your services in local server](../node.js/cds-serve) | `cds serve <services>` |
@@ -162,12 +162,12 @@ Following is an index of the features currently covered by CAP, with status and
162162

163163
<br>
164164

165-
| Outbound Protocol Support | CDS <sup>1</sup> | Node.js | Java |
166-
|-----------------------------------------------------------|:----------------:|:-------:|:----:|
167-
| [REST/OpenAPI](../node.js/cds-dk#cds-import-from-openapi) | <X/> | <X/> | <X/> |
168-
| OData V2 | <X/> | <X/> | <X/> |
169-
| OData V4 | <X/> | <X/> | <X/> |
170-
| GraphQL<sup>2</sup> | <C/> | <C/> | <C/> |
165+
| Outbound Protocol Support | CDS <sup>1</sup> | Node.js | Java |
166+
|------------------------------------------------------------------|:----------------:|:-------:|:----:|
167+
| [REST/OpenAPI](../tools/apis/cds-import#cds-import-from-openapi) | <X/> | <X/> | <X/> |
168+
| OData V2 | <X/> | <X/> | <X/> |
169+
| OData V4 | <X/> | <X/> | <X/> |
170+
| GraphQL<sup>2</sup> | <C/> | <C/> | <C/> |
171171

172172
> <sup>1</sup> Import API to CSN <br>
173173
> <sup>2</sup> Could be a good case for 3rd-party contribution <br>

about/index.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,36 @@ 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:450px; margin: auto" alt="The graphic is explained in the accompanying text.">
39+
<img src="../assets/overview.drawio.svg" style="width:480px; margin: auto" alt="The graphic is explained in the accompanying text.">
4040

4141
<div id="logos" style="text-align:center;">
4242
<img src="../assets/logos/nodejs.svg" style="height:40px" alt="Node.js logo" />
43-
<img src="../assets/logos/express.png" style="height:30px" alt="Express logo"/>
44-
<img src="../assets/logos/java.svg" style="height:44px" alt="Java logo"/>
43+
<img src="../assets/logos/express.png" style="height:34px" alt="Express logo"/>
44+
<img src="../assets/logos/java.svg" style="height:44px;margin-top:-10px;" alt="Java logo"/>
4545
<img src="../assets/logos/spring.svg" style="height:25px" alt="spring logo" />
4646
</div>
4747

4848
<style scoped>
49-
#logos img { display:inline-block; margin: 12px;align-items:center;vertical-align:middle }
49+
#logos {
50+
margin: 24px auto;
51+
max-width: 280px;
52+
display: grid;
53+
grid-template-columns: repeat(2, 1fr);
54+
justify-content: center;
55+
align-items: center;
56+
gap: 12px;
57+
}
58+
59+
#logos img {
60+
margin: 4px auto;
61+
}
62+
63+
@media (min-width: 500px) {
64+
#logos {
65+
max-width: 500px;
66+
grid-template-columns: repeat(4, 1fr);
67+
}
68+
}
5069
</style>
5170

5271
On top of open source technologies, CAP mainly adds:
@@ -72,7 +91,7 @@ That might sound like a contradiction, but isn't: While CAP certainly gives *opi
7291
| **Higher-level concepts and APIs** abstracting from and avoiding lock-ins to low-level platform features and protocols | All abstractions follow a glass-box pattern that allows unrestricted access to lower-level things, if required |
7392
| **Best Practices served out of the box** with generic solutions for many recurring tasks | You can always handle things your way in [custom handlers](../guides/providing-services#custom-logic), decide whether to adopt [CQRS](#cqrs) or [Event Sourcing](#event-sourcing), for example ... while CAP simply tries to get the tedious tasks out of your way. |
7493
| **Out-of-the-box support** for <br> **[SAP Fiori](https://developers.sap.com/topics/ui-development.html)** and **[SAP HANA](https://developers.sap.com/topics/hana.html)** | You can also choose other UI technologies, like [Vue.js](../get-started/in-a-nutshell#vue), or databases, by providing new database integrations. |
75-
| **Dedicated tools support** provided in [SAP Business Application Studio](../tools/cds-editors#bastudio) or [Visual Studio Code](../tools/cds-editors#vscode). | CAP doesn't depend on those tools. Everything in CAP can be done using the [`@sap/cds-dk`](../get-started/jumpstart) CLI and any editor or IDE of your choice. |
94+
| **Dedicated tools support** provided in [SAP Business Application Studio](../tools/cds-editors#bas) or [Visual Studio Code](../tools/cds-editors#vscode). | CAP doesn't depend on those tools. Everything in CAP can be done using the [`@sap/cds-dk`](../get-started/jumpstart) CLI and any editor or IDE of your choice. |
7695

7796

7897

advanced/fiori.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ You can't project from draft-enabled entities, as annotations are propagated. Ei
436436
:::
437437

438438
### Difference between Compositions and Associations
439-
Be aware that all compositions of the draft enabled entity are part of the same draft. Only those entities will get a `CREATE` button in SAP Fiori elements UIs as they are part of the draft. Associated entities on the other side can only be deleted or modified. Note that, for associations the changes are directly applied instead of being applied once changes are saved to the active version.
439+
Be aware that you must not modify associated entities through drafts. Only compositions will get a "Create" button in SAP Fiori elements UIs because they are stored as part of the same draft entity.
440440

441441
### Enabling Draft for [Localized Data](../guides/localized-data) {#draft-for-localized-data}
442442

@@ -646,6 +646,20 @@ If you have the need for a more complex calculation, then the interesting parts
646646
:::
647647

648648

649+
## Cache Control
650+
651+
CAP provides the option to set a [Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) header with a [max-age](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#max-age) directive to indicate that a response remains fresh until _n_ seconds after it was generated .
652+
In the CDS model, this can be done using the `@http.CacheControl: {maxAge: <seconds>}` annotation on stream properties. The header indicates that caches can store the response and reuse it for subsequent requests while it's fresh.
653+
The `max-age` (in seconds) specifies the maximum age of the content before it becomes stale.
654+
655+
:::info Elapsed time since the response was generated
656+
The `max-age` is the elapsed time since the response was generated on the origin server. It's not related to when the response was received.
657+
:::
658+
659+
::: warning Only Java
660+
Cache Control feature is currently supported on the Java runtime only.
661+
:::
662+
649663
<div id="client-side-validations" />
650664

651665
<div id="fiori-compat" />

advanced/hana.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Steps to match the signature of a database object in a facade entity:
4848
* Choose the names of the facade entity's elements, which are identical to the resulting database names of the existing database object's column names.
4949
* After applying the CDS-to-DB type mapping, check that the types of the facade entity's elements match the types of the database object's columns.
5050
* For a view, table function, or calculation view with parameters, check that the parameter names and types match, too.
51+
Functions with table-like input parameters are not supported.
5152

5253
> Note: If a field of that entity is defined as `not null` and you want to disable its runtime check, you can add [`@assert.notNull: false`](../guides/providing-services#assert-notNull). This is important if you want to use, for example [SAP HANA history tables](https://help.sap.com/docs/SAP_HANA_PLATFORM/6b94445c94ae495c83a19646e7c3fd56/d0b2c5142a19405fb912f71782cd0a84.html).
5354

advanced/odata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ The following operators and clauses of CDL are supported:
656656

657657
* `case when ... then ... else ...` and the logical ternary operator ` ? : `
658658
* Logical: `and`, `or`, `not`
659-
* Relational: `=`, `<>`, `!=`, `<`, `<=`, `>`, `>=`, `in`, `between ... and`
659+
* Relational: `=`, `<>`, `!=`, `<`, `<=`, `>`, `>=`, `in`, `between ... and ...`
660660
* Unary `+` and `-`
661661
* Arithmetic: `+`, `-`, `*`, `/`, `||`
662662
* `cast(...)`

cds/assets/csn.drawio.svg

Lines changed: 3 additions & 3 deletions
Loading

0 commit comments

Comments
 (0)