mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
Remove optional path parameter in C# generichost template (#17525)
* remove optional path parameter in C# generichost template * update
This commit is contained in:
@@ -391,17 +391,10 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
{{/-first}}
|
||||
{{/servers}}
|
||||
{{#pathParams}}
|
||||
{{#required}}
|
||||
uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString({{paramName}}.ToString()));
|
||||
{{/required}}
|
||||
{{^required}}
|
||||
|
||||
if ({{paramName}}.IsSet)
|
||||
uriBuilderLocalVar.Path = uriBuilderLocalVar.Path + $"/{ Uri.EscapeDataString({{paramName}}.Value).ToString()) }";
|
||||
{{#-last}}
|
||||
|
||||
{{/-last}}
|
||||
{{/required}}
|
||||
{{/pathParams}}
|
||||
{{#queryParams}}
|
||||
{{#-first}}
|
||||
|
||||
Reference in New Issue
Block a user