File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
5
5
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ ) .
6
6
7
+ ## Version 1.2.2 - tbd
8
+
9
+ ### Fixed
10
+
11
+ - Properties with ` @mandatory ` annotation is now added to ` required ` array.
12
+
7
13
## Version 1.2.1 - 11.03.2025
8
14
9
15
### Changed
Original file line number Diff line number Diff line change @@ -2034,6 +2034,7 @@ see [Expand](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-prot
2034
2034
Object . keys ( properties ) . forEach ( iName => {
2035
2035
const property = properties [ iName ] ;
2036
2036
if ( suffix === SUFFIX . read ) schemaProperties [ iName ] = getSchema ( property ) ;
2037
+ if ( ( Object . prototype . hasOwnProperty . call ( property , '@Common.FieldControl' ) ) && property [ '@Common.FieldControl' ] === 'Mandatory' ) { required . push ( iName ) }
2037
2038
if ( property . $Kind == 'NavigationProperty' ) {
2038
2039
if ( property . $Collection && suffix === "" && isCount === true ) {
2039
2040
schemaProperties [ `${ iName } @${ csdl . $Version === '4.0' ? 'odata.' : '' } count` ] = ref ( 'count' ) ;
You can’t perform that action at this time.
0 commit comments