@@ -64,7 +64,10 @@ namespace {{packageName}}.Api
6464 /// <summary >
6565 /// { {summary} } { {notes} }
6666 /// </summary >
67- { {#allParams} }{ {^vendorExtensions.x-param-group-camel} }/// <param name =" { { paramName} } " >{ {description} }{ {^required} } (optional{ {#defaultValue} }, default to { {.} }{ {/defaultValue} }){ {/required} }{ {#isDeprecated} } (deprecated){ {/isDeprecated} }</param >{ {/vendorExtensions.x-param-group-camel} }
67+ { {#allParams} }
68+ { {^vendorExtensions.x-param-group-camel} }
69+ /// <param name =" { { paramName} } " >{ {description} }{ {^required} } (optional{ {#defaultValue} }, default to { {.} }{ {/defaultValue} }){ {/required} }{ {#isDeprecated} } (deprecated){ {/isDeprecated} }</param >
70+ { {/vendorExtensions.x-param-group-camel} }
6871 { {/allParams} }
6972 { {#vendorExtensions.x-param-groups} }
7073 /// <param name =" { { camel} } " >Grouped parameters of type { {type} } (optional)</param >
@@ -90,17 +93,22 @@ namespace {{packageName}}.Api
9093 .Replace("& ; ", "& ")
9194 .Replace("/?", "?");
9295 { {#headerParams} }
93- { {#-first} }Dictionary<string , string > headerParams = new Dictionary<string , string >();{ {/-first} }
96+ { {#-first} }
97+ Dictionary<string , string > headerParams = new Dictionary<string , string >();
98+ { {/-first} }
9499 { {/headerParams} }
95100 { {#formParams} }
96- { {#-first} }MultipartFormDataContent multipartContent = new MultipartFormDataContent();{ {/-first} }
101+ { {#-first} }
102+ MultipartFormDataContent multipartContent = new MultipartFormDataContent();
103+ { {/-first} }
104+ { {^vendorExtensions.x-param-group-camel} }
97105 { {^isEnum} }
98106 if ({ {paramName} } != null)
99107 { {{/isEnum} } { {#isEnum} }{ {^required} }if ({ {paramName} } != null) { {{/required} }{ {/isEnum} }
100108 { {#isFile} }
101109 { {^required} }
102110 if ({ {paramName} } != null)
103- { {{/required} }
111+ { {{/required} }
104112 multipartContent.Add(new StreamContent({ {paramName} }), "{ {paramName} }", "{ {paramName} }.png");
105113 { {^required} } } { {/required} }
106114 { {/isFile} }
@@ -116,14 +124,25 @@ namespace {{packageName}}.Api
116124 { {/isPrimitiveType} }
117125 { {/isFile} }
118126 { {^isEnum} } } { {/isEnum} } { {#isEnum} }{ {^required} } } { {/required} }{ {/isEnum} }
127+ { {/vendorExtensions.x-param-group-camel} }
128+ { {#vendorExtensions.x-param-group-camel} }
129+ if ({ {vendorExtensions.x-param-group-camel} }?.{ {nameInPascalCase} } != null)
130+ {
131+ multipartContent.Add(new StringContent($" { {{vendorExtensions.x-param-group-camel}}?.{{nameInPascalCase}} }" ), " {{paramName}}" );
132+ }
133+ { {/vendorExtensions.x-param-group-camel} }
119134 { {/formParams} }
120135 { {#pathParams} }
121136 resourcePath = UrlHelper.AddPathParameter(resourcePath, "{ {paramName} }", { {paramName} });
122137 { {/pathParams} }
123138 { {#queryParams} }
124- { {#-first} }#pragma warning disable CS0618 // Type or member is obsolete{ {/-first} }
139+ { {#-first} }
140+ #pragma warning disable CS0618 // Type or member is obsolete
141+ { {/-first} }
125142 { {^vendorExtensions.x-param-group-camel} }resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "{ {paramName} }", { {paramName} });{ {/vendorExtensions.x-param-group-camel} }{ {#vendorExtensions.x-param-group-camel} }resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "{ {paramName} }", { {vendorExtensions.x-param-group-camel} }?.{ {nameInPascalCase} });{ {/vendorExtensions.x-param-group-camel} }
126- { {#-last} }#pragma warning restore CS0618 // Type or member is obsolete{ {/-last} }
143+ { {#-last} }
144+ #pragma warning restore CS0618 // Type or member is obsolete
145+ { {/-last} }
127146 { {/queryParams} }
128147 { {#hasBodyParam} }string postBody = SerializationHelper.Serialize({ {bodyParam.paramName} }); // http body (model) parameter{ {/hasBodyParam} }
129148
0 commit comments