File tree Expand file tree Collapse file tree
projects/angular-odata/schematics/apigen/metadata Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,12 +29,16 @@ export abstract class CsdlStructuralProperty extends CsdlAnnotable {
2929 }
3030
3131 override toJson ( ) {
32- return {
32+ const json : { [ key : string ] : any } = {
3333 ...super . toJson ( ) ,
3434 Name : this . Name ,
3535 Type : this . Collection ? `Collection(${ this . Type } )` : this . Type ,
3636 Nullable : this . Nullable ,
37- } as { [ key : string ] : any } ;
37+ } ;
38+ if ( this . Nullable !== undefined ) {
39+ json [ 'Nullable' ] = this . Nullable ;
40+ }
41+ return json ;
3842 }
3943
4044 isEdmType ( ) : boolean {
Original file line number Diff line number Diff line change @@ -592,7 +592,9 @@ export class ODataMetadataParser {
592592 }
593593
594594 protected propertyValueToBoolean ( attributeValue ?: string ) {
595- return attributeValue !== undefined ? attributeValue === 'true' : false ;
595+ return attributeValue !== undefined && attributeValue === 'true' ? true :
596+ attributeValue !== undefined && attributeValue === 'false' ? false :
597+ undefined ;
596598 }
597599
598600 protected propertyValueToDate ( attributeValue ?: string ) {
You can’t perform that action at this time.
0 commit comments