Skip to content

Commit dcf8110

Browse files
authored
Merge pull request #653 from microsoftgraph/feature/grammar-improvements
- grammar upgrades following review from @angelgolfer-ms
2 parents 7e313a5 + 3666112 commit dcf8110

File tree

1 file changed

+41
-39
lines changed

1 file changed

+41
-39
lines changed

docs/upgrade-to-v3.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,47 +15,49 @@ The following section lists out the breaking changes requiring code changes from
1515

1616
### Shorter package names
1717

18-
1. Replace any reference to `com.microsoft.graph.models.generated` and `com.microsoft.graph.models.extensions` by `com.microsoft.graph.models`.
19-
1. Replace any reference to `com.microsoft.graph.requests.extensions` by `com.microsoft.graph.requests`.
18+
To upgrade your application do the following.
19+
20+
- Replace any reference to `com.microsoft.graph.models.generated` and `com.microsoft.graph.models.extensions` by `com.microsoft.graph.models`.
21+
- Replace any reference to `com.microsoft.graph.requests.extensions` by `com.microsoft.graph.requests`.
2022

2123
### Cleanup of unecessary interfaces
2224

23-
To provide a cleaner API surface and avoid shipping potentially breaking changes when properties are added, some interfaces have been removed:
25+
To provide a cleaner API surface and avoid shipping potentially breaking changes when properties are added, some interfaces have been removed. To upgrade your application do the following.
2426

25-
1. Replace any reference to `IGraphServiceClient` by `GraphServiceClient`.
26-
1. Replace any reference to `IEntityCollectionPage` by `EntityCollectionPage` (e.g. `IEventCollectionPage`).
27+
- Replace any reference to `IGraphServiceClient` by `GraphServiceClient`.
28+
- Replace any reference to `IEntityCollectionPage` by `EntityCollectionPage` (e.g. `IEventCollectionPage`).
2729

2830
### Azure identity
2931

30-
The Microsoft Graph Java SDK now leverages azure-identity to improve the authentication experience. This new library provides support for [more authentication flows](https://docs.microsoft.com/graph/sdks/choose-authentication-providers?tabs=Java) and improves the configuration experience:
32+
The Microsoft Graph Java SDK now leverages azure-identity to improve the authentication experience. This new library provides support for [more authentication flows](https://docs.microsoft.com/graph/sdks/choose-authentication-providers?tabs=Java) and improves the configuration experience. To upgrade your application do the following.
3133

32-
1. Remove any dependency on `microsoft-graph-auth` and replace them by one of the providers available in azure-identity.
33-
1. Remove any dependency on `microsoft-graph-android-auth` and replace them by one of the providers available in azure-identity.
34-
1. Reconsider the need for custom authentication providers (implementation of `IAuthenticationProvider` or `ICoreAuthenticationProvider`) that might be part of your project and use a provider available in azure-identity whenever possible.
34+
- Remove any dependency on `microsoft-graph-auth` and replace them by one of the providers available in azure-identity.
35+
- Remove any dependency on `microsoft-graph-android-auth` and replace them by one of the providers available in azure-identity.
36+
- Reconsider the need for custom authentication providers (implementation of `IAuthenticationProvider` or `ICoreAuthenticationProvider`) that might be part of your project and use a provider available in azure-identity whenever possible.
3537

3638
Check out [this document](./upgrade-to-v3-auth.md) to find examples on how to upgrade your authentication providers to azure-identity providers.
3739

3840
### Single authentication provider interface
3941

40-
Due to historical reasons, the SDK provided two authentication provider interfaces `ICoreAuthenticationProvider` and `IAuthenticationProvider`. This was creating confusion and duplication and has been resolved to a single `IAuthenticationProvider` interface. If you implemented any of those interfaces you should:
42+
Due to historical reasons, the SDK provided two authentication provider interfaces `ICoreAuthenticationProvider` and `IAuthenticationProvider`. This was creating confusion and duplication and has been resolved to a single `IAuthenticationProvider` interface. To upgrade your application do the following.
4143

42-
1. Replace any reference to `ICoreAuthenticationProvider` by `IAuthenticationProvider`.
43-
1. Update the implementation to match the new interface.
44-
1. Replace any reference to `com.microsoft.graph`.
44+
- Replace any reference to `ICoreAuthenticationProvider` by `IAuthenticationProvider`.
45+
- Update the implementation to match the new interface.
46+
- Replace any reference to `com.microsoft.graph`.
4547

4648
> Note: if your project implements its own authentication provider, you might want to review the list of providers available with Azure identity to review whether a custom provider is still required. If a custom provider is still required, you should extend `BaseAuthenticationProvider` which provides a method to check whether a spefic request should be authenticated based on its URL.
4749
4850
### Modern date and time API
4951

50-
To provide a modern, more reliable, and faster date and time API, `Calendar` properties have been replaced by `OffsetDateTime` properties:
52+
To provide a modern, more reliable, and faster date and time API, `Calendar` properties have been replaced by `OffsetDateTime` properties. To upgrade your application do the following.
5153

52-
1. Replace any `Calendar` assignment by `OffsetDateTime`.
54+
- Replace any `Calendar` assignment by `OffsetDateTime`.
5355

5456
### Fluent method parameter sets and support for optional parameters
5557

56-
To provide support for optional parameters for OData methods (actions, functions), the SDK now makes use of parameter classes with fluent builders:
58+
To provide support for optional parameters for OData methods (actions, functions), the SDK now makes use of parameter classes with fluent builders. To upgrade your application do the following.
5759

58-
1. Replace any OData method reference by it's parameter set equivalent.
60+
- Replace any OData method reference by it's parameter set equivalent.
5961

6062
Example:
6163

@@ -84,9 +86,9 @@ To provide support for optional parameters for OData methods (actions, functions
8486

8587
### Futures vs Callbacks
8688

87-
To provide a standard and modern way of executing requests asynchronuously to SDK users, the custom defined `ICallback` interface has been removed and the API now returns `CompletableFuture`.
89+
To provide a standard and modern way of executing requests asynchronuously to SDK users, the custom defined `ICallback` interface has been removed and the API now returns `CompletableFuture`. To upgrade your application do the following.
8890

89-
1. Replace any of the code built the following way
91+
- Replace any of the code built the following way
9092

9193
```Java
9294
graphClient
@@ -116,16 +118,16 @@ To provide a standard and modern way of executing requests asynchronuously to SD
116118

117119
### Non-generated code moved to the core library
118120

119-
The service library (microsoft-graph) was designed to contain only code that has been generated automatically from the API metadata. All code that has been manually handcrafted should live in the core library (microsoft-graph-core). This principle makes reusability of code easier for consumers and it was not respected until this new version of the SDK. All the code living under anything but `com.microsoft.graph.models` or `com.microsoft.graph.requests` have been moved to the same package name in the core asset. This move should be transparent to consumers, except for the following that needs to be updated:
121+
The service library (microsoft-graph) was designed to contain only code that has been generated automatically from the API metadata. All code that has been manually handcrafted should live in the core library (microsoft-graph-core). This principle makes reusability of code easier for consumers and it was not respected until this new version of the SDK. All the code living under anything but `com.microsoft.graph.models` or `com.microsoft.graph.requests` have been moved to the same package name in the core asset. This move should be transparent to consumers, except for the following that needs to be updated. To upgrade your application do the following.
120122

121-
1. Replace any reference to `ChunkUploadProvider` from `com.microsoft.graph.requests.extensions` to `com.microsoft.graph.concurrency`.
122-
1. Replace any reference to `CustomRequestBuilder`, `DateOnly`, `TimeOfDay`, and `Multipart` from `com.microsoft.graph.(models|requests).extensions` to `com.microsoft.graph.core`.
123+
- Replace any reference to `ChunkUploadProvider` from `com.microsoft.graph.requests.extensions` to `com.microsoft.graph.concurrency`.
124+
- Replace any reference to `CustomRequestBuilder`, `DateOnly`, `TimeOfDay`, and `Multipart` from `com.microsoft.graph.(models|requests).extensions` to `com.microsoft.graph.core`.
123125

124126
### Removal of connection configuration
125127

126-
As the connection configuration evolved over time, the connection configuration infrastructure had become redundant with the native library configuration capabilities:
128+
As the connection configuration evolved over time, the connection configuration infrastructure had become redundant with the native library configuration capabilities. To upgrade your application do the following.
127129

128-
1. Remove any reference to `IConnectionConfiguration` and re-implement the configuration using [Customize the Microsoft Graph SDK service client](https://docs.microsoft.com/graph/sdks/customize-client?tabs=java).
130+
- Remove any reference to `IConnectionConfiguration` and re-implement the configuration using [Customize the Microsoft Graph SDK service client](https://docs.microsoft.com/graph/sdks/customize-client?tabs=java).
129131

130132
### Dependencies upgrade
131133

@@ -136,25 +138,25 @@ No action needs to be taken unless the project has a direct reference to an olde
136138

137139
### float properties have been replaced by Float
138140

139-
As the OData specification mandates support for null values for numeric values, any property that previously was implemented using a float primitive type is now using a Float object type:
141+
As the OData specification mandates support for null values for numeric values, any property that previously was implemented using a float primitive type is now using a Float object type. To upgrade your application do the following.
140142

141-
1. Replace any assignment from float to Float and check for null values.
143+
- Replace any assignment from float to Float and check for null values.
142144

143145
### Merge of GraphServiceClient and BaseGraphServiceClient
144146

145-
To simplify the object model of the SDK, `BaseGraphServiceClient` has been merged into `GraphServiceClient`:
147+
To simplify the object model of the SDK, `BaseGraphServiceClient` has been merged into `GraphServiceClient`. To upgrade your application do the following.
146148

147-
1. Replace any reference to `BaseGraphServiceClient` by `GraphServiceClient`.
149+
- Replace any reference to `BaseGraphServiceClient` by `GraphServiceClient`.
148150

149151
### Generic refactoring
150152

151153
Requests, request builders, and responses have been refactored to take advantage of generic types. This maximizes code reusability improving performances, binary size and more. These changes should be transparent to most SDK consumers but it's possible to impact developers calling the SDK using reflection techniques.
152154
153155
## Batch object model improvements
154156
155-
The object model for JSON batching has been improved to provide a cleaner API surface to SDK users:
157+
The object model for JSON batching has been improved to provide a cleaner API surface to SDK users. To upgrade your application do the following.
156158
157-
1. Replace any of the following patterns
159+
- Replace any of the following patterns
158160
159161
```Java
160162
final MSBatchRequestContent batchRequestContent = new MSBatchRequestContent();
@@ -182,10 +184,10 @@ The object model for JSON batching has been improved to provide a cleaner API su
182184
183185
### IJsonBackedObject interface
184186
185-
The interface has been simplified to remove the `getRawObject` and `getSerializer` methods. This avoid entity and collection objects storing a copy of the JSON on top of the properties they already have, which improves drastically the memory impacts:
187+
The interface has been simplified to remove the `getRawObject` and `getSerializer` methods. This avoid entity and collection objects storing a copy of the JSON on top of the properties they already have, which improves drastically the memory impacts. To upgrade your application do the following.
186188
187-
1. Replace any reference to `getRawObject` by `additionalDataManager`.
188-
1. Replace any reference to `getSerializer` by `graphClient.getSerializer` or create a new instance of the serializer.
189+
- Replace any reference to `getRawObject` by `additionalDataManager`.
190+
- Replace any reference to `getSerializer` by `graphClient.getSerializer` or create a new instance of the serializer.
189191
190192
### Improved delta API
191193
@@ -194,9 +196,9 @@ When using [change tracking/delta APIs](https://docs.microsoft.com/graph/delta-q
194196
- A next link whenever there are more change results to iterate through.
195197
- A delta link whenever there are no more change results to iterate through at this instant. This is the link your application should use to get new changes in the future.
196198
197-
This new version improves the Java API provided to developers.
199+
This new version improves the Java API provided to developers. To upgrade your application do the following.
198200
199-
1. Replace any of the following
201+
- Replace any of the following
200202
201203
```Java
202204
graphClient.users().delta("https://mydeltalink").buildRequest().get();
@@ -208,7 +210,7 @@ This new version improves the Java API provided to developers.
208210
graphClient.users().delta().buildRequest().deltaLink("https://mydeltalink").get();
209211
```
210212
211-
1. Replace any of the following
213+
- Replace any of the following
212214
213215
```Java
214216
graphClient.customRequest("mydeltaPathAndQuery").buildRequest().get();
@@ -228,9 +230,9 @@ This section lists out other improvements which are not considered as breaking c
228230
229231
### Support for OData Count
230232
231-
The SDK now produces methods to include the count of items included in collections:
233+
The SDK now produces methods to include the count of items included in collections. To upgrade your application do the following.
232234
233-
1. Replace any use of `QueryOption`
235+
- Replace any use of `QueryOption`
234236
235237
```Java
236238
graphClient
@@ -249,7 +251,7 @@ The SDK now produces methods to include the count of items included in collectio
249251
.get();
250252
```
251253
252-
1. Replace any custom request
254+
- Replace any custom request
253255
254256
```Java
255257
graphClient

0 commit comments

Comments
 (0)