@sap/cds-compiler 5.9.2 → 5.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/lib/edm/edmPreprocessor.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
Note: `beta` fixes, changes and features are usually not listed in this ChangeLog but [here](doc/CHANGELOG_BETA.md).
|
|
8
8
|
The compiler behavior concerning `beta` features can change at any time without notice.
|
|
9
9
|
|
|
10
|
+
## Version 5.9.4 - 2025-05-22
|
|
11
|
+
|
|
12
|
+
- to.edm(x): Parameters are marked optional unless explicitly marked as `not null`.
|
|
13
|
+
Annotation `Core.OptionalParameter` will be added to optional parameters.
|
|
14
|
+
|
|
10
15
|
## Version 5.9.2 - 2025-04-04
|
|
11
16
|
|
|
12
17
|
### Fixed
|
|
@@ -2152,9 +2152,11 @@ function initializeModel( csn, _options, messageFunctions, requestedServiceNames
|
|
|
2152
2152
|
edmUtils.assignAnnotation(p, '@Core.OptionalParameter.DefaultValue', p.default.val);
|
|
2153
2153
|
optPns.push(p);
|
|
2154
2154
|
}
|
|
2155
|
-
// nullable action params are optional (implicit default null)
|
|
2156
|
-
else if (!p.notNull
|
|
2155
|
+
// nullable action/function params are optional (implicit default null)
|
|
2156
|
+
else if (!p.notNull) {
|
|
2157
2157
|
optPns.push(p);
|
|
2158
|
+
if (action.kind === 'function')
|
|
2159
|
+
p['@Core.OptionalParameter'] = { $Type: '' };
|
|
2158
2160
|
}
|
|
2159
2161
|
else if (action.kind === 'function') {
|
|
2160
2162
|
// this is a mandatory parameter, warn about all previously collected optional parameters
|