Skip to content

Commit 20b0705

Browse files
authored
Merge pull request #310 from microsoftgraph/dev
updates from dev
2 parents 981d48c + 62ac71d commit 20b0705

39 files changed

+117
-115
lines changed

src/GraphODataTemplateWriter/CodeHelpers/Java/TypeHelperJava.cs

+11-9
Original file line numberDiff line numberDiff line change
@@ -1269,9 +1269,9 @@ public static string CreateParameterDef(IEnumerable<OdcmParameter> parameters)
12691269
* The {0}.
12701270
* {1}
12711271
*/
1272-
@SerializedName(""{2}"")
1272+
@SerializedName(value = ""{2}"", alternate = {{""{3}""}})
12731273
@Expose
1274-
public {3} {4};
1274+
public {4} {5};
12751275
12761276
";
12771277
foreach (var p in parameters)
@@ -1281,6 +1281,7 @@ public static string CreateParameterDef(IEnumerable<OdcmParameter> parameters)
12811281
p.ParamName().SplitCamelCase(),
12821282
ReplaceInvalidCharacters(p.LongDescription),
12831283
p.ParamName(),
1284+
p.ParamName().ToUpperFirstChar(),
12841285
p.ParamType(),
12851286
p.ParamName().SanitizePropertyName(p).ToLowerFirstChar()
12861287
);
@@ -1413,19 +1414,19 @@ public static string CreatePropertyDef(IEnumerable<OdcmProperty> properties, boo
14131414
var format =
14141415
@" /**
14151416
* The {0}.
1416-
* {4}
1417+
* {1}
14171418
*/
1418-
@SerializedName(""{1}"")
1419+
@SerializedName(value = ""{2}"", alternate = {{""{3}""}})
14191420
@Expose
1420-
public {2} {3};
1421+
public {4} {5};
14211422
14221423
";
14231424
var collectionFormat =
14241425
@" /**
14251426
* The {0}.
1426-
* {4}
1427+
* {1}
14271428
*/
1428-
public {2} {3};
1429+
public {4} {5};
14291430
14301431
";
14311432

@@ -1454,10 +1455,11 @@ public static string CreatePropertyDef(IEnumerable<OdcmProperty> properties, boo
14541455

14551456
sb.AppendFormat(propertyFormat,
14561457
propertyName.SplitCamelCase(),
1458+
GetSanitizedDescription(property),
14571459
property.Name,
1460+
propertyName,
14581461
propertyType,
1459-
property.Name.ToLowerFirstChar().SanitizePropertyName(property),
1460-
GetSanitizedDescription(property));
1462+
property.Name.ToLowerFirstChar().SanitizePropertyName(property));
14611463
}
14621464
return sb.ToString();
14631465
}

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/Call.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class Call extends Entity implements IJsonBackedObject {
2626
* The Subject.
2727
*
2828
*/
29-
@SerializedName("subject")
29+
@SerializedName(value = "subject", alternate = {"Subject"})
3030
@Expose
3131
public String subject;
3232

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/CloudCommunications.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ public class CloudCommunications extends Entity implements IJsonBackedObject {
3030
* The Calls.
3131
*
3232
*/
33-
@SerializedName("calls")
33+
@SerializedName(value = "calls", alternate = {"Calls"})
3434
@Expose
3535
public CallCollectionPage calls;
3636

3737
/**
3838
* The Call Records.
3939
*
4040
*/
41-
@SerializedName("callRecords")
41+
@SerializedName(value = "callRecords", alternate = {"CallRecords"})
4242
@Expose
4343
public CallRecordCollectionPage callRecords;
4444

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/DerivedComplexTypeRequest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ public class DerivedComplexTypeRequest extends EmptyBaseComplexTypeRequest imple
2727
* The Property1.
2828
*
2929
*/
30-
@SerializedName("property1")
30+
@SerializedName(value = "property1", alternate = {"Property1"})
3131
@Expose
3232
public String property1;
3333

3434
/**
3535
* The Property2.
3636
*
3737
*/
38-
@SerializedName("property2")
38+
@SerializedName(value = "property2", alternate = {"Property2"})
3939
@Expose
4040
public String property2;
4141

4242
/**
4343
* The Enum Property.
4444
*
4545
*/
46-
@SerializedName("enumProperty")
46+
@SerializedName(value = "enumProperty", alternate = {"EnumProperty"})
4747
@Expose
4848
public Enum1 enumProperty;
4949

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/DirectoryObject.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class DirectoryObject extends Entity implements IJsonBackedObject {
2626
* The Deleted Date Time.
2727
*
2828
*/
29-
@SerializedName("deletedDateTime")
29+
@SerializedName(value = "deletedDateTime", alternate = {"DeletedDateTime"})
3030
@Expose
3131
public java.util.Calendar deletedDateTime;
3232

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/Endpoint.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class Endpoint extends Entity implements IJsonBackedObject {
2626
* The Property1.
2727
*
2828
*/
29-
@SerializedName("property1")
29+
@SerializedName(value = "property1", alternate = {"Property1"})
3030
@Expose
3131
public Long property1;
3232

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/Entity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public final AdditionalDataManager additionalDataManager() {
3535
* The Id.
3636
*
3737
*/
38-
@SerializedName("id")
38+
@SerializedName(value = "id", alternate = {"Id"})
3939
@Expose
4040
public String id;
4141

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/EntityType3ForwardBody.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,39 +23,39 @@ public class EntityType3ForwardBody {
2323
* The to Recipients.
2424
*
2525
*/
26-
@SerializedName("toRecipients")
26+
@SerializedName(value = "toRecipients", alternate = {"ToRecipients"})
2727
@Expose
2828
public java.util.List<Recipient> toRecipients;
2929

3030
/**
3131
* The single Recipient.
3232
*
3333
*/
34-
@SerializedName("singleRecipient")
34+
@SerializedName(value = "singleRecipient", alternate = {"SingleRecipient"})
3535
@Expose
3636
public Recipient singleRecipient;
3737

3838
/**
3939
* The multiple Sessions.
4040
*
4141
*/
42-
@SerializedName("multipleSessions")
42+
@SerializedName(value = "multipleSessions", alternate = {"MultipleSessions"})
4343
@Expose
4444
public java.util.List<Session> multipleSessions;
4545

4646
/**
4747
* The single Session.
4848
*
4949
*/
50-
@SerializedName("singleSession")
50+
@SerializedName(value = "singleSession", alternate = {"SingleSession"})
5151
@Expose
5252
public Session singleSession;
5353

5454
/**
5555
* The comment.
5656
*
5757
*/
58-
@SerializedName("comment")
58+
@SerializedName(value = "comment", alternate = {"Comment"})
5959
@Expose
6060
public String comment;
6161

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/Identity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public final AdditionalDataManager additionalDataManager() {
3535
* The Display Name.
3636
*
3737
*/
38-
@SerializedName("displayName")
38+
@SerializedName(value = "displayName", alternate = {"DisplayName"})
3939
@Expose
4040
public String displayName;
4141

4242
/**
4343
* The Id.
4444
*
4545
*/
46-
@SerializedName("id")
46+
@SerializedName(value = "id", alternate = {"Id"})
4747
@Expose
4848
public String id;
4949

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/IdentitySet.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@ public final AdditionalDataManager additionalDataManager() {
3636
* The Application.
3737
*
3838
*/
39-
@SerializedName("application")
39+
@SerializedName(value = "application", alternate = {"Application"})
4040
@Expose
4141
public Identity application;
4242

4343
/**
4444
* The Device.
4545
*
4646
*/
47-
@SerializedName("device")
47+
@SerializedName(value = "device", alternate = {"Device"})
4848
@Expose
4949
public Identity device;
5050

5151
/**
5252
* The User.
5353
*
5454
*/
55-
@SerializedName("user")
55+
@SerializedName(value = "user", alternate = {"User"})
5656
@Expose
5757
public Identity user;
5858

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/OnenotePageForwardBody.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ public class OnenotePageForwardBody {
2222
* The to Recipients.
2323
*
2424
*/
25-
@SerializedName("toRecipients")
25+
@SerializedName(value = "toRecipients", alternate = {"ToRecipients"})
2626
@Expose
2727
public java.util.List<Recipient> toRecipients;
2828

2929
/**
3030
* The details.
3131
*
3232
*/
33-
@SerializedName("details")
33+
@SerializedName(value = "details", alternate = {"Details"})
3434
@Expose
3535
public String details;
3636

3737
/**
3838
* The comment.
3939
*
4040
*/
41-
@SerializedName("comment")
41+
@SerializedName(value = "comment", alternate = {"Comment"})
4242
@Expose
4343
public String comment;
4444

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/Recipient.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public final AdditionalDataManager additionalDataManager() {
3535
* The Name.
3636
*
3737
*/
38-
@SerializedName("name")
38+
@SerializedName(value = "name", alternate = {"Name"})
3939
@Expose
4040
public String name;
4141

4242
/**
4343
* The Email.
4444
*
4545
*/
46-
@SerializedName("email")
46+
@SerializedName(value = "email", alternate = {"Email"})
4747
@Expose
4848
public String email;
4949

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/Schedule.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ public class Schedule extends Entity implements IJsonBackedObject {
3030
* The Enabled.
3131
*
3232
*/
33-
@SerializedName("enabled")
33+
@SerializedName(value = "enabled", alternate = {"Enabled"})
3434
@Expose
3535
public Boolean enabled;
3636

3737
/**
3838
* The Times Off.
3939
*
4040
*/
41-
@SerializedName("timesOff")
41+
@SerializedName(value = "timesOff", alternate = {"TimesOff"})
4242
@Expose
4343
public TimeOffCollectionPage timesOff;
4444

4545
/**
4646
* The Time Off Requests.
4747
*
4848
*/
49-
@SerializedName("timeOffRequests")
49+
@SerializedName(value = "timeOffRequests", alternate = {"TimeOffRequests"})
5050
@Expose
5151
public TimeOffRequestCollectionPage timeOffRequests;
5252

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/SingletonEntity1.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class SingletonEntity1 extends Entity implements IJsonBackedObject {
2727
* The Test Single Nav.
2828
*
2929
*/
30-
@SerializedName("testSingleNav")
30+
@SerializedName(value = "testSingleNav", alternate = {"TestSingleNav"})
3131
@Expose
3232
public TestType testSingleNav;
3333

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/SingletonEntity2.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class SingletonEntity2 extends Entity implements IJsonBackedObject {
2727
* The Test Single Nav2.
2828
*
2929
*/
30-
@SerializedName("testSingleNav2")
30+
@SerializedName(value = "testSingleNav2", alternate = {"TestSingleNav2"})
3131
@Expose
3232
public EntityType3 testSingleNav2;
3333

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/TestEntity.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@ public class TestEntity extends Entity implements IJsonBackedObject {
2929
* The Test Nav.
3030
*
3131
*/
32-
@SerializedName("testNav")
32+
@SerializedName(value = "testNav", alternate = {"TestNav"})
3333
@Expose
3434
public TestType testNav;
3535

3636
/**
3737
* The Test Invalid Nav.
3838
*
3939
*/
40-
@SerializedName("testInvalidNav")
40+
@SerializedName(value = "testInvalidNav", alternate = {"TestInvalidNav"})
4141
@Expose
4242
public EntityType2 testInvalidNav;
4343

4444
/**
4545
* The Test Explicit Nav.
4646
*
4747
*/
48-
@SerializedName("testExplicitNav")
48+
@SerializedName(value = "testExplicitNav", alternate = {"TestExplicitNav"})
4949
@Expose
5050
public EntityType3 testExplicitNav;
5151

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/TestType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class TestType extends Entity implements IJsonBackedObject {
2727
* The Property Alpha.
2828
*
2929
*/
30-
@SerializedName("propertyAlpha")
30+
@SerializedName(value = "propertyAlpha", alternate = {"PropertyAlpha"})
3131
@Expose
3232
public DerivedComplexTypeRequest propertyAlpha;
3333

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/TestTypeQueryBody.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class TestTypeQueryBody {
2323
* The requests.
2424
*
2525
*/
26-
@SerializedName("requests")
26+
@SerializedName(value = "requests", alternate = {"Requests"})
2727
@Expose
2828
public java.util.List<DerivedComplexTypeRequest> requests;
2929

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/TimeOff.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class TimeOff extends Entity implements IJsonBackedObject {
2626
* The Name.
2727
*
2828
*/
29-
@SerializedName("name")
29+
@SerializedName(value = "name", alternate = {"Name"})
3030
@Expose
3131
public String name;
3232

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/TimeOffRequest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class TimeOffRequest extends Entity implements IJsonBackedObject {
2626
* The Name.
2727
*
2828
*/
29-
@SerializedName("name")
29+
@SerializedName(value = "name", alternate = {"Name"})
3030
@Expose
3131
public String name;
3232

test/Typewriter.Test/TestDataJava/com/microsoft/graph/models/extensions/User.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class User extends DirectoryObject implements IJsonBackedObject {
2626
* The Account Enabled.
2727
* true if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter.
2828
*/
29-
@SerializedName("accountEnabled")
29+
@SerializedName(value = "accountEnabled", alternate = {"AccountEnabled"})
3030
@Expose
3131
public Boolean accountEnabled;
3232

0 commit comments

Comments
 (0)