Skip to content

Commit 8e7fe26

Browse files
author
Caitlin Bales (MSFT)
authored
Merge pull request #120 from microsoftgraph/odata-type
Odata type
2 parents 0a9059b + 960a608 commit 8e7fe26

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Templates/Android/generated/BaseEntity.java.tt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import java.util.Map;
1717
if(((OdcmClass)c).Base == null){
1818
#>
1919
@SerializedName("@odata.type")
20-
@Expose(serialize = false)
20+
@Expose
2121
public String oDataType;
2222

2323
private transient AdditionalDataManager additionalDataManager = new AdditionalDataManager(this);
@@ -30,10 +30,6 @@ import java.util.Map;
3030
}
3131
#>
3232

33-
public <#=BaseTypeName(c)#>() {
34-
oDataType = "<#=((OdcmClass)c).FullName#>";
35-
}
36-
3733
<#=CreatePropertyDef(((OdcmClass)c).Properties, c is OdcmComplexClass)#>
3834
<#=CreateRawJsonObject()#>
3935
<#=UpdatePropertiesWithinSetRawObject(((OdcmClass)c).Properties, c is OdcmComplexClass)#>

Templates/Java/models_generated/BaseEntity.java.tt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import java.util.Map;
1717
if(((OdcmClass)c).Base == null){
1818
#>
1919
@SerializedName("@odata.type")
20-
@Expose(serialize = false)
20+
@Expose
2121
public String oDataType;
2222

2323
private transient AdditionalDataManager additionalDataManager = new AdditionalDataManager(this);
@@ -30,10 +30,6 @@ import java.util.Map;
3030
}
3131
#>
3232

33-
public <#=BaseTypeName(c)#>() {
34-
oDataType = "<#=((OdcmClass)c).FullName#>";
35-
}
36-
3733
<#=CreatePropertyDef(((OdcmClass)c).Properties, c is OdcmComplexClass)#>
3834
<#=CreateRawJsonObject()#>
3935
<#=UpdatePropertiesWithinSetRawObject(((OdcmClass)c).Properties, c is OdcmComplexClass)#>

0 commit comments

Comments
 (0)