@@ -608,6 +608,11 @@ public static string MethodParametersJavadocSignature(this OdcmMethod method)
608608 return parameterSignatureBuilder . ToString ( ) ;
609609 }
610610
611+ /// <summary>
612+ /// Takes a property object and gets to its type, then returns that types fully qualified namespace: e.g. com.microsoft.graph.callrecords
613+ /// </summary>
614+ /// <param name="p">property object</param>
615+ /// <returns>fully qualified namespace of a property</returns>
611616 public static string GetPropertyNamespace ( this OdcmProperty p ) => p . Projection . Type . Namespace . Name . AddPrefix ( ) ;
612617
613618 public static string MethodParametersSignature ( this OdcmMethod method )
@@ -846,6 +851,13 @@ public static string CreatePackageDefForBaseMethodRequestBuilder(this CustomT4Ho
846851 return sb . ToString ( ) ;
847852 }
848853
854+ /// <summary>
855+ /// Appends import statements of types that appear as a method's parameters
856+ /// </summary>
857+ /// <param name="method">Method whose parameter types will be consumed</param>
858+ /// <param name="importFormat">import format, e.g. "import {0}.{1}.{2}"</param>
859+ /// <param name="sb">StringBuilder object currently in use</param>
860+ /// <returns>StringBuilder object with import statements inserted</returns>
849861 public static StringBuilder ImportClassesOfMethodParameters ( OdcmMethod method , string importFormat , StringBuilder sb )
850862 {
851863 var importStatements = new HashSet < string > ( ) ;
@@ -1130,6 +1142,11 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
11301142
11311143 public static string CreatePackageDef ( this CustomT4Host host )
11321144 {
1145+ // {0}: type's namespace with prefix, e.g. com.microsoft.graph.callrecords
1146+ // {1}: relative path, e.g. "models.extensions" or "models.requests" etc.
1147+ // {2}: main namespace, i.e. microsoft.graph
1148+ // {3}: fully qualified import for disambiguation, e.g. TimeOff vs TimeOffRequest
1149+ // {4}: method parameters fully qualified imports
11331150 var format = @"package {0}.{1};
11341151
11351152import {2}.concurrency.*;
@@ -1146,6 +1163,7 @@ public static string CreatePackageDef(this CustomT4Host host)
11461163 // We need this for disambiguation of generated model class/interfaces references.
11471164 string fullyQualifiedImport = host . GetFullyQualifiedImportStatementForModel ( ) ;
11481165
1166+ // determine current namespace and generate method imports if applicable
11491167 string @namespace ;
11501168 string methodImports = string . Empty ;
11511169 switch ( host . CurrentType )
@@ -1170,6 +1188,11 @@ public static string CreatePackageDef(this CustomT4Host host)
11701188 methodImports ) ;
11711189 }
11721190
1191+ /// <summary>
1192+ /// Determines which namespace current type belongs to
1193+ /// </summary>
1194+ /// <param name="host">Host object to reach current type being processed</param>
1195+ /// <returns>namespace with prefix prepended, e.g. com.microsoft.graph.callrecords</returns>
11731196 public static string CurrentNamespace ( this CustomT4Host host )
11741197 {
11751198 switch ( host . CurrentType )
0 commit comments