Skip to content

Commit 03b2f74

Browse files
committed
- fixes an issues where imports would be missing
_ fixes an issue where the base client would do invlid casting
1 parent fea4af3 commit 03b2f74

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Templates/Java/models_extensions/IClient.java.tt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<#=writer.WriteHeader()#>
77
<#=CreatePackageDef(host)#>
88
import com.google.gson.JsonObject;
9+
import com.microsoft.graph.core.IBaseClient;
10+
import com.microsoft.graph.requests.extensions.CustomRequestBuilder;
911

1012
<#=CreateInterfaceDef(IClientType(c), IBaseClientType(c))#>
1113
<# if(host.TemplateName.Equals("IGraphServiceClient")){ #>

Templates/Java/requests_extensions/BaseClient.java.tt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
<#@ output extension="\\" #>
55
<#=writer.WriteHeader()#>
66
<#=CreatePackageDef(host)#>
7+
import com.microsoft.graph.core.IBaseClient;
8+
import com.microsoft.graph.models.extensions.IGraphServiceClient;
9+
import com.microsoft.graph.models.extensions.<#=IBaseClientType(c)#>;
10+
import com.microsoft.graph.core.BaseClient;
711

812
<#=CreateClassDef(BaseClientType(c), "BaseClient", IBaseClientType(c))#>
913

@@ -43,7 +47,7 @@ foreach (var prop in model.EntityContainer.Properties)
4347
* @return the request builder for the collection of <#=propertyName#> objects
4448
*/
4549
public <#=ITypeCollectionRequestBuilder(prop)#> <#=prop.Name#>() {
46-
return new <#=TypeCollectionRequestBuilder(prop)#>(getServiceRoot() + "/<#=prop.Name#>", (<#=IClientType(c)#>)this, null);
50+
return new <#=TypeCollectionRequestBuilder(prop)#>(getServiceRoot() + "/<#=prop.Name#>", this, null);
4751
}
4852

4953
/**
@@ -53,7 +57,7 @@ foreach (var prop in model.EntityContainer.Properties)
5357
* @return the request builder for the <#=propertyName#> object
5458
*/
5559
public <#=ITypeRequestBuilder(prop)#> <#=prop.Name#>(final String id) {
56-
return new <#=TypeRequestBuilder(prop)#>(getServiceRoot() + "/<#=prop.Name#>/" + id, (<#=IClientType(c)#>)this, null);
60+
return new <#=TypeRequestBuilder(prop)#>(getServiceRoot() + "/<#=prop.Name#>/" + id, this, null);
5761
}
5862
<#
5963
}
@@ -67,7 +71,7 @@ foreach (var prop in model.EntityContainer.Properties)
6771
* @return the <#=prop.Projection.Type.GetTypeString()#>
6872
*/
6973
public <#=ITypeRequestBuilder(prop)#> <#=prop.Name#>() {
70-
return new <#=TypeRequestBuilder(prop)#>(getServiceRoot() + "/<#=prop.Name#>", (<#=IClientType(c)#>)this, null);
74+
return new <#=TypeRequestBuilder(prop)#>(getServiceRoot() + "/<#=prop.Name#>", this, null);
7175
}
7276
<#
7377
}

0 commit comments

Comments
 (0)