File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed
src/GraphODataTemplateWriter/CodeHelpers/TypeScript Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 33<#@ include file="SharedObjC.template.tt"#>
44<#
55
6- var func = host.CurrentType.AsOdcmMethod();
6+ OdcmMethod func = host.CurrentType.AsOdcmMethod();
77var entityName = writer.GetPrefix() + func.Class.Name.ToUpperFirstChar();
8- var method = (func.IsFunction() ) ? "GET" : "POST";
8+ var method = (func.IsFunction) ? "GET" : "POST";
99var methodName = "request";
1010var requestType = entityName + func.Name.Substring(func.Name.IndexOf('.') + 1).ToUpperFirstChar() + "Request";
1111var requestBuilderType = requestType + "Builder";
Original file line number Diff line number Diff line change 44<#
55var func = host.CurrentType.AsOdcmMethod();
66var entityName = writer.GetPrefix() + func.Class.Name.ToUpperFirstChar();
7- var method = (func.IsFunction() ) ? "GET" : "POST";
7+ var method = (func.IsFunction) ? "GET" : "POST";
88var methodName = "request";
99var requestType = entityName + func.Name.Substring(func.Name.IndexOf('.') + 1).ToUpperFirstChar() + "Request";
1010var requestBuilderType = requestType + "Builder";
Original file line number Diff line number Diff line change @@ -28,8 +28,13 @@ export type <#= enumType.Name.UpperCaseFirstChar() #> = <#= enumType.GetEnumValu
2828#>
2929
3030export 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-
4347export 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<# } #>
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments