Skip to content

Commit 9c3cee4

Browse files
author
Caitlin Bales (MSFT)
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into cbales-working
2 parents e08b62e + 4b1a5a2 commit 9c3cee4

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

Templates/ObjC/Requests/MethodRequestBuilder.h.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<#@ include file="SharedObjC.template.tt"#>
44
<#
55

6-
var func = host.CurrentType.AsOdcmMethod();
6+
OdcmMethod func = host.CurrentType.AsOdcmMethod();
77
var entityName = writer.GetPrefix() + func.Class.Name.ToUpperFirstChar();
8-
var method = (func.IsFunction()) ? "GET" : "POST";
8+
var method = (func.IsFunction) ? "GET" : "POST";
99
var methodName = "request";
1010
var requestType = entityName + func.Name.Substring(func.Name.IndexOf('.') + 1).ToUpperFirstChar() + "Request";
1111
var requestBuilderType = requestType + "Builder";

Templates/ObjC/Requests/MethodRequestBuilder.m.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<#
55
var func = host.CurrentType.AsOdcmMethod();
66
var entityName = writer.GetPrefix() + func.Class.Name.ToUpperFirstChar();
7-
var method = (func.IsFunction()) ? "GET" : "POST";
7+
var method = (func.IsFunction) ? "GET" : "POST";
88
var methodName = "request";
99
var requestType = entityName + func.Name.Substring(func.Name.IndexOf('.') + 1).ToUpperFirstChar() + "Request";
1010
var requestBuilderType = requestType + "Builder";

Templates/TypeScript/src/entity_types.ts.tt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ export type <#= enumType.Name.UpperCaseFirstChar() #> = <#= enumType.GetEnumValu
2828
#>
2929

3030
export interface <#= entityType.Name.UpperCaseFirstChar() #><# if (entityType.Base != null) { #> extends <#= entityType.Base.Name.UpperCaseFirstChar() #><# }#> {
31+
3132
<# foreach(var prop in entityType.Properties.ToList()) { #>
33+
<# if (prop.LongDescription != null) { #>
34+
/** <#=prop.LongDescription#> */
35+
<# } #>
3236
<#= prop.Name #>?: <#= prop.GetTypeString() #>
37+
3338
<# } #>
3439
}
3540
<#
@@ -39,10 +44,14 @@ export interface <#= entityType.Name.UpperCaseFirstChar() #><# if (entityType.Ba
3944
foreach(var complexType in complexTypes)
4045
{
4146
#>
42-
4347
export interface <#= complexType.Name.UpperCaseFirstChar()#><# if (complexType.Base != null) { #> extends <#= complexType.Base.Name.UpperCaseFirstChar() #><# }#> {
48+
4449
<# foreach(var prop in complexType.Properties) { #>
45-
<#= prop.Name #>?: <#= prop.GetTypeString() #>
50+
<# if (prop.LongDescription != null) { #>
51+
/** <#=prop.LongDescription#> */
52+
<# } #>
53+
<#= prop.Name #>?: <#= prop.GetTypeString() #>
54+
4655
<# } #>
4756
}
4857
<# } #>

src/GraphODataTemplateWriter/CodeHelpers/TypeScript/TypeHelperTypeScript.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static string GetTypeString(this OdcmProperty prop)
5252
break;
5353

5454
}
55-
return (prop.IsCollection) ? "[" + typeStr + "]" : typeStr;
55+
return (prop.IsCollection) ? typeStr + "[]" : typeStr;
5656

5757
}
5858
public static String UpperCaseFirstChar(this String s)

0 commit comments

Comments
 (0)