Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
86fc082
chore(deps): update dependency @cap-js/cds-types to v0.10.0 (#1753)
renovate[bot] Apr 4, 2025
a926067
chore(deps): update dependency @cap-js/cds-typer to v0.34.0 (#1752)
renovate[bot] Apr 4, 2025
43b3614
chore(deps): update dependency sass to v1.86.3 (#1747)
renovate[bot] Apr 4, 2025
913c261
chore(deps): update dependency @sap/cds to v8.9.1 (#1745)
renovate[bot] Apr 4, 2025
d3a805b
chore(deps): update dependency @typescript-eslint/parser to v8.29.0 (…
renovate[bot] Apr 4, 2025
de46bab
Remove `--for production` from facets (#1763)
swaldmann Apr 8, 2025
7475c03
Typescript: add global installation of `tsx` earlier (#1761)
nikolockenvitz Apr 8, 2025
6852798
chore(deps): update eslint (#1760)
renovate[bot] Apr 8, 2025
317758c
Remove commented out snippet for monorepo setups in CF guide (#1765)
swaldmann Apr 8, 2025
745c16a
Proper code blocks for `format-cds`
swaldmann Apr 14, 2025
3a80224
Punctuation in synopsis
swaldmann Apr 14, 2025
aa1543d
shared-db (#1717)
DanSchlachter Apr 14, 2025
2fe7fef
Remove Beta for `cds debug` (#1769)
swaldmann Apr 14, 2025
1bba0ab
Update code example in outbox.md technical outbox API snippet (#1758)
metzing Apr 14, 2025
babfec7
Remove oauth2-configuration snippet from CF deployment guide (#1764)
swaldmann Apr 15, 2025
fb6d916
Describe limitations of remote services (#1756)
mofterdinger Apr 15, 2025
5fa9b59
Minor updates for to-cf.md (#1775)
qmacro Apr 16, 2025
1c851bc
microservice review (#1776)
renejeglinsky Apr 17, 2025
3facd79
chore(deps): update dependency @typescript-eslint/parser to v8.30.1 (…
renovate[bot] Apr 17, 2025
5b11316
chore(deps): update dependency @sap/cds to v8.9.2 (#1772)
renovate[bot] Apr 17, 2025
d55996e
chore: Update CLI texts (#1767)
github-actions[bot] Apr 17, 2025
d343af4
chore(deps): update dependency cspell to v8.19.0 (#1779)
renovate[bot] Apr 17, 2025
7719729
microservice update (#1778)
Akatuoro Apr 17, 2025
20c287c
Describe recursive hierarchies (#1770)
eugene-andreev Apr 17, 2025
fe23b36
chore(deps): update dependency com.sap.cds:cds4j-api to v3.9.1 (#1781)
renovate[bot] Apr 17, 2025
37c0b16
chore(deps): update dependency com.sap.cds:cds-services-api to v3.9.1…
renovate[bot] Apr 22, 2025
b5d8164
chore(deps): update dependency sass to v1.87.0 (#1786)
renovate[bot] Apr 22, 2025
e85ae1d
chore(deps): update eslint (#1785)
renovate[bot] Apr 22, 2025
9e9a448
chore(deps): update dependency cspell to v8.19.2 (#1784)
renovate[bot] Apr 22, 2025
e113301
chore: Update CLI texts (#1787)
github-actions[bot] Apr 24, 2025
49eae8f
Examples for Node server events (#1777)
sjvans Apr 24, 2025
f9925f8
chore: Update CLI texts (#1802)
github-actions[bot] Apr 30, 2025
9d8c9c4
chore(deps): update dependency @typescript-eslint/parser to v8.31.1 (…
renovate[bot] Apr 30, 2025
b1c7be4
Use `cds up` in multitenancy guide (#1803)
swaldmann Apr 30, 2025
03a1dc0
Fix 404 link in Java testing guide (#1806)
swaldmann Apr 30, 2025
d746ec8
Add `cds add ias` and `cds add ams` to feature list (#1812)
swaldmann May 6, 2025
2d1dd5e
feat: standard database functions everywhere (#1750)
patricebender May 6, 2025
ea38315
Added section about async profiler with cf java (#1771)
davidhunglam May 6, 2025
234d6b0
Fix `npm i` script for MTX sidecar installation
swaldmann May 6, 2025
55feb3c
Describe pessimistic lock restrictions (#1796)
eugene-andreev May 7, 2025
b7aacca
chore(deps): update dependency com.sap.cds:cds4j-api to v3.10.0 (#1815)
renovate[bot] May 7, 2025
935b160
chore(deps): update eslint (#1808)
renovate[bot] May 7, 2025
09a6499
chore(deps): update dependency @sap/cds to v8.9.3 (#1814)
renovate[bot] May 7, 2025
58d7e8b
chore: Update CLI texts (#1816)
github-actions[bot] May 7, 2025
b73df3d
chore: remove deprecated feature flag `cds.log.kibana_custom_fields` …
schwma May 7, 2025
6937e8b
Remove deprecated `dependencies` setting (#1817)
swaldmann May 7, 2025
c8bccaf
chore(deps): update dependency com.sap.cds:cds-services-api to v3.10.…
renovate[bot] May 7, 2025
baab0dd
move
renejeglinsky May 9, 2025
842ede4
add flow
renejeglinsky May 9, 2025
bad1946
Update best-practices.md (#1823)
renejeglinsky May 9, 2025
e78617a
dynamic field control and assert constraint (#1804)
StefanHenke May 9, 2025
4132e22
Details on CSV data recovery using HDI (#1822)
chgeo May 9, 2025
208148a
Clarifications for CF deployment guide (#1821)
swaldmann May 9, 2025
56e7978
chore: use new standard GH token (#1835)
chgeo May 12, 2025
a6b81b5
chore(deps): update dependency sass to v1.88.0 (#1833)
renovate[bot] May 12, 2025
8934f85
chore(deps): update dependency cspell to v9 (#1811)
renovate[bot] May 12, 2025
04eb8d9
Recommend more modern SQLite viewer
chgeo May 12, 2025
a70c976
Rename token
chgeo May 13, 2025
1262251
chore(deps): update dependency @typescript-eslint/parser to v8.32.1 (…
renovate[bot] May 13, 2025
5d3cbda
fix: update feature details for clarity and accuracy
danjoa May 13, 2025
9c0ff7c
chore: fix typo (#1846)
sjvans May 15, 2025
5f2c6f5
Update `cds lint` Page (#1847)
daogrady May 15, 2025
3bade5e
chore: increase chunk limit
chgeo May 15, 2025
08ec536
Slight update on SAP CI/CD and Piper docs
chgeo May 15, 2025
33b3686
Remove link to custom actions that are disabled
chgeo May 15, 2025
d139d78
add
renejeglinsky May 16, 2025
b3696f7
Merge branch 'main' of https://github.com/cap-js/docs
renejeglinsky May 16, 2025
4fca022
Review of migration guide (#1841)
ecklie May 16, 2025
757fda6
chore(deps): update dependency com.sap.cds:cds4j-api to v3.10.1 (#1854)
renovate[bot] May 16, 2025
80b54d7
chore(deps): update dependency @sap/cds to v8.9.4 (#1853)
renovate[bot] May 16, 2025
657b666
chore(deps): update dependency sass to v1.89.0 (#1852)
renovate[bot] May 16, 2025
7096c91
chore(deps): update dependency com.sap.cds:cds-services-api to v3.10.…
renovate[bot] May 16, 2025
9e429b7
cds 9: modified input validations (#1809)
David-Kunz May 17, 2025
f86f488
Fix `cds build` spacing for learn-more
swaldmann May 19, 2025
a52007d
(cds 9) Std DB functions by default (#1829)
stewsk May 19, 2025
3c3e9fb
chore(deps): update dependency markdownlint-cli to v0.45.0 (#1858)
renovate[bot] May 19, 2025
330bc5c
chore(deps): update dependency @types/express to v4.17.22 (#1857)
renovate[bot] May 19, 2025
3aef573
chore(deps): update dependency eslint to v9.27.0 (#1856)
renovate[bot] May 19, 2025
233384c
(cds 9) Propagation of doc comments (#1825)
stewsk May 20, 2025
7cc1fdd
add I-Suite AEM
renejeglinsky May 20, 2025
450d2bb
cds9: rm draft compat flag (#1768)
johannes-vogel May 20, 2025
96255c6
(cds9) remove section on "compile to hdbcds" (#1789)
stewsk May 20, 2025
0c91bf1
cds9: remove fallback to default language (#1766)
johannes-vogel May 20, 2025
d9450d6
chore(deps): update dependency cspell to v9.0.2 (#1863)
renovate[bot] May 20, 2025
37ea3c3
Add tip to prevent outdated lock file issues
swaldmann May 20, 2025
25d8eff
(cds 9) Virtual elements in views (#1826)
stewsk May 20, 2025
c655e91
chore: remove deprecated `cds.ql` `INSERT.as` method (#1794)
schwma May 20, 2025
44365f4
cds9: remove footnote for data aggregation (#1800)
johannes-vogel May 20, 2025
24ae3e8
cds9: use cloud sdk 4 (#1807)
mariayord May 20, 2025
95d9330
(cds 9) No native HANA associations (#1827)
stewsk May 20, 2025
c22a702
(cds 9) Journal annotation is copied to generated child entities (#1828)
stewsk May 20, 2025
92de77d
fix anchor link for aem (#1864)
johannes-vogel May 20, 2025
aa64c91
Java minimum dependency versions major (#1842)
BraunMatthias May 20, 2025
72302c4
Remove deprecated APIs from CAP Java Messaging docs (#1843)
beckermarc May 20, 2025
79da8bb
docs: update cds-data.md (#1788)
quachhengtony May 20, 2025
c244888
Fix Kyma/Kubernetes guide (#1845)
tim-sh May 20, 2025
1a781ee
Improvements on fiori page (#1851)
chgeo May 20, 2025
81b0ca6
Removed broken links to ../developing-applications/properties#cds-err…
mofterdinger May 20, 2025
39e3edd
Allow detection of CI host
chgeo May 20, 2025
2e0a97c
add spring-boot-starter-security note (#1792)
Akatuoro May 21, 2025
c198a1f
Ensure proper encoding of badge URLs
chgeo May 21, 2025
5700c96
Attachment plugin (#1797)
DanSchlachter May 21, 2025
7ed0a78
chore: Update CLI texts (#1866)
github-actions[bot] May 21, 2025
704ff03
Document State Messages in Java Drafts section (#1869)
beckermarc May 22, 2025
5804d87
Doc improvements on 'Custom Builds' (#1837)
daogrady May 22, 2025
44ee347
Changes for SDM Plugin (#1859)
rishikunnath2747 May 22, 2025
ec9f1d6
docs: revised editor docs (#1868)
manwithafox May 22, 2025
3347232
Explain some caveats in change tracking (#1798)
niemda May 23, 2025
7d9982c
feat: Task Queues (#1861)
sjvans May 23, 2025
133b88e
fix menu
renejeglinsky May 23, 2025
9b50fe7
fix
renejeglinsky May 23, 2025
f73e385
hint for know mtxs issue with java (#1870)
ecklie May 23, 2025
44c3f2a
Removed chapter about exporting default messages. (#1860)
mofterdinger May 23, 2025
2aa0dd1
cds9: changes to req.params (#1873)
johannes-vogel May 23, 2025
f5408ce
asyncAPI compile guide update (#1840)
jeevitha011 May 26, 2025
b617565
CAP Java: Migration Guide 3 to 4 (#1824)
mofterdinger May 27, 2025
ea26065
Fix: wide table rows go over outline
chgeo May 27, 2025
2258d96
UCL in Java (#1867)
StefanHenke May 28, 2025
87b3dad
cds 9: task queue (#1790)
David-Kunz May 28, 2025
0768e93
cds.log(): add hint re header masking (#1830)
sjvans May 28, 2025
a83e9ee
feat: ias token validation (#1862)
sjvans May 28, 2025
e64c493
chore: Update CLI texts (#1882)
github-actions[bot] May 28, 2025
2856e87
chore(deps): update dependency @cap-js/cds-typer to v0.35.0 (#1872)
renovate[bot] May 28, 2025
e2e48d3
SAP Integration Suite, Advanced Event Mesh (#1871)
sjvans May 28, 2025
2a91413
Update java security (preparing major release) (#1877)
BraunMatthias May 28, 2025
9316e91
Java Migration Guide: Removed APIs (#1879)
MattSchur May 28, 2025
426d90e
Remove `@odata.apply.transformations` (#1884)
eugene-andreev Jun 2, 2025
b38bbd0
Runtime Views: `CTE` mode (#1880)
MattSchur Jun 3, 2025
8ddc1c9
add headings in cds.queued() docs (#1885)
sjvans Jun 3, 2025
fa4c367
Internal CdsJsonConverter documentation (#1883)
t-bonk Jun 3, 2025
9224c1c
fix: redirect url (#1889)
vkozyura Jun 3, 2025
9fbc0d2
[Java] copy 'Log CDS Configuration' into observability (#1839)
JenniferStamm Jun 3, 2025
9752d8f
Release microservices guide (#1891)
Akatuoro Jun 4, 2025
487e451
Document CDL Operators vs CAP Java Operators (#1892)
agoerler Jun 4, 2025
e9ca1dc
Update versions.md (#1893)
mofterdinger Jun 4, 2025
2ba9905
Document cds.Map type (#1895)
agoerler Jun 4, 2025
e24f0b2
Merge branch 'cap.cloud.sap' into main
renejeglinsky Jun 4, 2025
55a4724
edit
renejeglinsky Jun 4, 2025
8da86c8
chore: Update CLI texts (#1896)
github-actions[bot] Jun 4, 2025
0f4d43f
fix links (#1898)
danjoa Jun 4, 2025
876a531
Documented cds.ql() function
danjoa Jun 4, 2025
97c12ae
Restructured content in cds.connect docs
danjoa Jun 4, 2025
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
5 changes: 3 additions & 2 deletions .github/workflows/PR-SAP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: |
git config --global credential.helper "cache --timeout=3600"
echo -e "url=https://user:${GH_TOKEN}@github.com\n" | git credential approve
echo -e "url=https://user:${GH_TOKEN_PARENT}@github.tools.sap\n" | git credential approve
echo -e "url=https://user:${GH_TOKEN_TOOLS_DOCS}@github.tools.sap\n" | git credential approve
git clone --depth 1 --no-single-branch https://github.tools.sap/cap/docs docs
cd docs
git checkout $GITHUB_HEAD_REF || git checkout main
Expand All @@ -27,7 +27,7 @@ jobs:
git checkout $GITHUB_HEAD_REF
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN_PARENT: ${{ secrets.GH_TOKEN_PARENT }}
GH_TOKEN_TOOLS_DOCS: ${{ secrets.GH_TOKEN_TOOLS_DOCS }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -44,6 +44,7 @@ jobs:
working-directory: docs
env:
NODE_OPTIONS: "--max-old-space-size=6144"
VITE_CAPIRE_CI_HOST: "github.com"
- name: Find broken anchor links
working-directory: docs
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: |
git config --global credential.helper "cache --timeout=3600"
echo -e "url=https://user:${GH_TOKEN}@github.com\n" | git credential approve
echo -e "url=https://user:${GH_TOKEN_PARENT}@github.tools.sap\n" | git credential approve
echo -e "url=https://user:${GH_TOKEN_TOOLS_DOCS}@github.tools.sap\n" | git credential approve
git clone --depth 1 --no-single-branch https://github.tools.sap/cap/docs docs
cd docs
git checkout $GITHUB_HEAD_REF || git checkout main
Expand All @@ -28,7 +28,7 @@ jobs:
git checkout $GITHUB_HEAD_REF
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN_PARENT: ${{ secrets.GH_TOKEN_PARENT }}
GH_TOKEN_TOOLS_DOCS: ${{ secrets.GH_TOKEN_TOOLS_DOCS }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const config = defineConfig({

vite: {
build: {
chunkSizeWarningLimit: 5000, // chunk for local search index dominates
chunkSizeWarningLimit: 6000, // chunk for local search index dominates
},
css: {
preprocessorOptions: {
Expand Down Expand Up @@ -106,8 +106,8 @@ config.rewrites = rewrites
// Add custom capire info to the theme config
config.themeConfig.capire = {
versions: {
java_services: '3.9.0',
java_cds4j: '3.9.0'
java_services: '3.10.1',
java_cds4j: '3.10.1'
},
gotoLinks: [],
maven_host_base: 'https://repo1.maven.org/maven2'
Expand Down
13 changes: 5 additions & 8 deletions .vitepress/theme/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ main {

table {
tr, th, td {
// &:nth-child(2n) {
background-color: transparent !important;
// }
background-color: var(--vp-c-bg);
}
td, th {
border-color: #bbb; .dark & { border-color: #555 };
Expand Down Expand Up @@ -520,11 +518,6 @@ a.learn-more, p.learn-more, .learn-more {

.VPBadge { white-space: nowrap; }

/* remove transparency in the odd rows (when it scrolls over outline) */
tr:nth-child(odd) {
background-color: var(--vp-c-bg);
}

html.java {
& .node {
display: none;
Expand All @@ -550,6 +543,10 @@ html.node {
table:focus {
min-width: fit-content;
}
tr { // make wide rows go over outline, not below it
z-index: 1;
position: relative;
}
[class*='language-'] pre {
overflow: hidden !important;
}
Expand Down
90 changes: 33 additions & 57 deletions advanced/fiori.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion advanced/hana.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Steps to match the signature of a database object in a facade entity:
* For a view, table function, or calculation view with parameters, check that the parameter names and types match, too.
Functions with table-like input parameters are not supported.

> 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).
> 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`. 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).


As a result, the database name is defined by the name of the entity or its elements, after applying the SQL name mapping.
Expand Down
74 changes: 69 additions & 5 deletions advanced/odata.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Content-Type: application/json

PATCH requests with delta payload are executed using batch delete and [upsert](../java/working-with-cql/query-api#bulk-upsert) statements, and are more efficient than OData [batch requests](https://docs.oasis-open.org/odata/odata/v4.01/csprd02/part1-protocol/odata-v4.01-csprd02-part1-protocol.html#sec_BatchRequests).

Use PATCH on entity collections for uploading mass data using a dedicated service, which is secured using [role-based authorization](../java/security#role-based-auth). Delta updates must be explicitly enabled by annotating the entity with
Use PATCH on entity collections for uploading mass data using a dedicated service, which is secured using [role-based authorization](../guides/security/authorization#requires). Delta updates must be explicitly enabled by annotating the entity with

```cds
@Capabilities.UpdateRestrictions.DeltaUpdateSupported
Expand Down Expand Up @@ -1060,14 +1060,13 @@ If the `groupby` transformation only includes a subset of the entity keys, the r
| `aggregate` | aggregate values | <X/> | <X/> |
| `compute` | add computed properties to the result set | <Na/> | <X/> |
| `expand` | expand navigation properties | <Na/> | <Na/> |
| `concat` | append additional aggregation to the result | <X/><sup>(1)</sup> | <X/> |
| `skip` / `top` | paginate | <X/><sup>(1)</sup> | <X/> |
| `orderby` | sort the input set | <X/><sup>(1)</sup> | <X/> |
| `concat` | append additional aggregation to the result | <X/> | <X/> |
| `skip` / `top` | paginate | <X/> | <X/> |
| `orderby` | sort the input set | <X/> | <X/> |
| `topcount`/`bottomcount` | retain highest/lowest _n_ values | <Na/> | <Na/> |
| `toppercent`/`bottompercent` | retain highest/lowest _p_% values | <Na/> | <Na/> |
| `topsum`/`bottomsum` | retain _n_ values limited by sum | <Na/> | <Na/> |

- <sup>(1)</sup> Supported with experimental feature `cds.features.odata_new_parser = true`

#### `concat`

Expand Down Expand Up @@ -1139,6 +1138,71 @@ GET SalesOrganizations?$apply=
/ancestors(..., ID, filter(contains(Name, 'New York')), keep start)
```

#### Modeling Recursive Hierarchies

Recursive hierarchies are parent-child hierarchies, where each entity references its parent and through that defines the hierarchical structure. A common example is a company organization structure or HR reporting, where each employee entity references another employee a as direct report or manager.

##### Domain Model

The simplest domain model looks as follows:

```cds
entity Employee : Hierarchy {
key ID : UUID;
parent : Association to Employee;
fullName : String;
}

aspect Hierarchy {
virtual LimitedDescendantCount : Integer64;
virtual DistanceFromRoot : Integer64;
virtual DrillState : String;
virtual LimitedRank : Integer64;
}
```

The entity `Employee` has the element `ID`, which identifies the hierarchy node. The `parent` association references the same entity, which establishes the parent-child relationship.

##### Virtual Elements of a Hierarchy

The `Hierarchy` aspect defines a set of virtual elements, automatically calculated by the backend at runtime, to describe the state of the hierarchy. This information is requested by the UI to correctly render the hierarchy in a *TreeTable* during user interaction.

##### Service Model

The following service defines the projection on the domain model.

```cds
service HRService {
entity HREmployee as projection on Employee;
}
```


##### OData v4 Annotations for Fiori

To link the backend and Fiori UI, the projected service entity must be enriched with the following annotations.

```cds
annotate HRService.HREmployee with @Aggregation.RecursiveHierarchy #EmployeeHierarchy: {
$Type: 'Aggregation.RecursiveHierarchyType',
NodeProperty: ID,
ParentNavigationProperty: parent
};
```

Here the `EmployeeHierarchy` specifies a hierarchy qualifier, `NodeProperty` (identifying the hierarchy node) is linked to `ID` of the entity `HREmployee`, and the `ParentNavigationProperty` is linked to a corresponding `parent` association.

```cds
annotate HRService.HREmployee with @Hierarchy.RecursiveHierarchy #EmployeeHierarchy: {
$Type: 'Hierarchy.RecursiveHierarchyType',
LimitedDescendantCount: LimitedDescendantCount,
DistanceFromRoot: DistanceFromRoot,
DrillState: DrillState,
LimitedRank: LimitedRank
};
```

Here the same qualifier `EmployeeHierarchy` is referenced to list the names of the [virtual elements of the hierarchy](#virtual-elements-of-a-hierarchy).

### Aggregation Methods

Expand Down
41 changes: 37 additions & 4 deletions advanced/publishing-apis/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,39 @@ service CatalogService {
}
```

## Extensions { #extensions}

`@AsyncAPI.Extensions` can be used to provide arbitrary extensions.
If a specific annotation exists for a given extension, it takes precedence over the definition using @AsyncAPI.Extensions.
For example, if both `@AsyncAPI.ShortText` and `@AsyncAPI.Extensions: { ![sap-shortText]: 'baz' }` are provided, the value from `@AsyncAPI.ShortText` will override the one defined in @AsyncAPI.Extensions.

For example:

```cds
@AsyncAPI.Extensions : {
![foo-bar] : 'baz',
![sap-shortText] : 'Service Base 1'
}

service CatalogService {
@AsyncAPI.Extensions : {
![sap-event-source] : '/{region}/sap.app.test'
}
event SampleEntity.Changed.v1 : projection on CatalogService.SampleEntity;
}
```

The `@AsyncAPI.Extensions` annotation can be applied at both the service level and the event level.

Since the AsyncAPI specification requires all extensions to be prefixed with `x-`, the compiler will automatically add this prefix. Therefore, do not include the `x-` prefix when specifying extensions in `@AsyncAPI.Extensions`.

### Behavior with `--merged` flag

When the `--merged` CLI flag is used:

- Extensions defined via `@AsyncAPI.Extensions` on `services` are **ignored**.
- Extensions defined via `@AsyncAPI.Extensions` on `events` remain effective and are applied as expected.

## Type Mapping { #mapping}

CDS Type to AsyncAPI Mapping
Expand All @@ -120,15 +153,15 @@ CDS Type to AsyncAPI Mapping
| `Boolean` | `{ "type": "boolean" }` |
| `Integer` | `{ "type": "integer" }` |
| `Integer64` | `{ "type": "string", "format": "int64" }` |
| `Decimal`, `{precision, scale}` | `{ "type": "string", "format": "decimal", "formatPrecision": <precision>, "formatScale": <scale> }` |
| `Decimal`, without scale | `{ "type": "string", "format": "decimal", "formatPrecision": <precision> }` |
| `Decimal`, `{precision, scale}` | `{ "type": "string", "format": "decimal", "x-sap-precision": <precision>, "x-sap-scale": <scale> }` |
| `Decimal`, without scale | `{ "type": "string", "format": "decimal", "x-sap-precision": <precision> }` |
| `Decimal`, without precision and scale | `{ "type": "string", "format": "decimal" }` |
| `Double` | `{ "type": "number" }` |
| `Date` | `{ "type": "string", "format": "date" }` |
| `Time` | `{ "type": "string", "format": "partial-time" }` |
| `DateTime` | `{ "type": "string", "format": "date-time" }` |
| `Timestamp` | `{ "type": "string", "format": "date-time" }` |
| `String` | `{ "type": "string", "maxLength": length }` |
| `Binary` | `{ "type": "string", "maxLength": length }` |
| `String`, `{maxLength}` | `{ "type": "string", "maxLength": length }` |
| `Binary`, `{maxLength}` | `{ "type": "string", "maxLength": length }` |
| `LargeBinary` | `{ "type": "string" }` |
| `LargeString` | `{ "type": "string" }` |
6 changes: 0 additions & 6 deletions cds/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ uacp: Used as link target from Help Portal at https://help.sap.com/products/BTP/

| Annotation | Description |
|---------------|------------------------------------------------------------------|
| `@readonly` | see [Input Validation](../guides/providing-services#readonly) |
| `@insertonly` | see [Generic Handlers](../guides/providing-services) |
| `@restrict` | see [Authorization](../guides/security/authorization#restrict-annotation) |
| `@requires` | see [Authorization](../guides/security/authorization#requires) |

Expand All @@ -40,12 +38,9 @@ uacp: Used as link target from Help Portal at https://help.sap.com/products/BTP/
|---------------------|----------------------------------------------------------------------|
| `@readonly ` | see [Input Validation](../guides/providing-services#readonly) |
| `@mandatory` | see [Input Validation](../guides/providing-services#mandatory) |
| `@assert.unique` | see [Input Validation](../guides/providing-services#assert-unique) |
| `@assert.integrity` | see [Input Validation](../guides/databases#database-constraints) |
| `@assert.target` | see [Input Validation](../guides/providing-services#assert-target) |
| `@assert.format` | see [Input Validation](../guides/providing-services#assert-format) |
| `@assert.range` | see [Input Validation](../guides/providing-services#assert-range) |
| `@assert.notNull` | see [Input Validation](../guides/providing-services#assert-notnull) |



Expand Down Expand Up @@ -102,4 +97,3 @@ Intrinsically supported OData Annotations:
| `@Core.IsMediaType` | see [Media Data](../guides/providing-services#serving-media-data) |
| `@Core.IsUrl` | see [Media Data](../guides/providing-services#serving-media-data) |
| `@Capabilities...` | see [Fiori](../advanced/fiori) |
| `@Common.FieldControl` | see [Input Validation](../guides/providing-services#common-fieldcontrol) |
47 changes: 29 additions & 18 deletions cds/cdl.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,20 +302,9 @@ entity Employees {
```

The text of a doc comment is stored in CSN in the property `doc`.
When generating OData EDM(X), it appears as value for the annotation `@Core.Description`.

When generating output for deployment to SAP HANA, the first paragraph of a doc comment is translated to the HANA `COMMENT` feature for tables, table columns, and for views (but not for view columns):

```sql
CREATE TABLE Employees (
ID INTEGER,
name NVARCHAR(...) COMMENT 'I am the description for "name"'
) COMMENT 'I am the description for "Employee"'
```

::: tip
Propagation of doc comments can be stopped via an empty one: `/** */`.
:::
Doc comments are not propagated. For example, a doc comment defined for an entity
isn't automatically copied to projections of this entity.
When generating OData EDM(X), doc comments are translated to the annotation `@Core.Description`.

In CAP Node.js, doc comments need to be switched on when calling the compiler:

Expand All @@ -331,13 +320,20 @@ cds.compile(..., { docs: true })

:::

::: tip Doc comments are enabled by default in CAP Java.
In CAP Java, doc comments are automatically enabled by the [CDS Maven Plugin](../java/developing-applications/building#cds-maven-plugin). In generated interfaces they are [converted to corresponding Javadoc comments](../java/assets/cds-maven-plugin-site/generate-mojo.html#documentation).
::: tip Doc comments are automatically enabled in CAP Java.
In CAP Java, doc comments are automatically enabled by the [CDS Maven Plugin](../java/developing-applications/building#cds-maven-plugin).
In generated interfaces they are [converted to corresponding Javadoc comments](../java/assets/cds-maven-plugin-site/generate-mojo.html#documentation).
:::

When generating output for deployment to SAP HANA, the first paragraph of a doc comment is translated
to the HANA `COMMENT` feature for tables, table columns, and for views (but not for view columns):



```sql
CREATE TABLE Employees (
ID INTEGER,
name NVARCHAR(...) COMMENT 'I am the description for "name"'
) COMMENT 'I am the description for "Employee"'
```


## Entities & Type Definitions
Expand Down Expand Up @@ -808,6 +804,21 @@ By using a cast, annotations and other properties are inherited from the provide

<div id="afterinferredsig" />

### Virtual elements in views

Virtual elements can be defined in views or projections like this:
```cds
entity SomeView as select from Employee {
// ...,
virtual virt1 : String(22),
virtual virt2 // virtual element without type
}
```
These virtual elements have no relation to the query source `Employee` but are new fields
in the view. Virtual elements in views or projections are handled as described in the
section on [virtual elements in entities](#virtual-elements).


<div id="beforeviewwithparam" />

### Views with Parameters
Expand Down
2 changes: 1 addition & 1 deletion cds/cql.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ SQL casts and CDL casts. The former produces SQL casts when rendered into SQL, w
SELECT cast (foo+1 as Decimal) as bar from Foo; -- standard SQL
SELECT from Foo { foo+1 as bar : Decimal }; -- CDL-style
```
[learn more about CDL type definitions](./cdl#types){.learn-more}
[Learn more about CDL type definitions](./cdl#types){.learn-more}

Use SQL casts when you actually want a cast in SQL. CDL casts are useful for expressions such as `foo+1` as the compiler does not deduce types.
For the OData backend, by specifying a type, the compiler will also assign the correct EDM type in the generated EDM(X) files.
Expand Down
Loading