Skip to content

Commit f6bd6c1

Browse files
HugoMariofrantuma
authored andcommitted
use allParams instead parameters element, in order to fix issue with method empty of arguments.
1 parent 8df9f97 commit f6bd6c1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

modules/swagger-codegen/src/main/resources/aspnetcore/2.1/controller.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ namespace {{packageName}}.Controllers
2222
{ {{#operation}}
2323
/// <summary>
2424
/// {{#summary}}{{summary}}{{/summary}}
25-
/// </summary>{{#notes}}
26-
/// <remarks>{{notes}}</remarks>{{/notes}}{{#parameters}}
27-
/// <param name="{{paramName}}">{{description}}</param>{{/parameters}}{{#responses}}
25+
/// </summary>
26+
{{#notes}}/// <remarks>{{notes}}</remarks>{{/notes}}{{#allParams}}
27+
/// <param name="{{paramName}}">{{description}}</param>{{/allParams}}{{#responses}}
2828
/// <response code="{{code}}">{{message}}</response>{{/responses}}
2929
[{{httpMethod}}]
3030
[Route("{{{basePathWithoutHost}}}{{{path}}}")]
@@ -44,7 +44,7 @@ namespace {{packageName}}.Controllers
4444
[ValidateModelState]
4545
[SwaggerOperation("{{operationId}}")]{{#responses}}{{#dataType}}
4646
[SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{^dataType}}{{/dataType}}{{/responses}}
47-
public virtual IActionResult {{operationId}}({{#parameters}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/parameters}})
47+
public virtual IActionResult {{operationId}}({{#allParams}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
4848
{ {{#responses}}
4949
{{#dataType}}
5050
//TODO: Uncomment the next line to return response {{code}} or use other options such as return this.NotFound(), return this.BadRequest(..), ...

modules/swagger-codegen/src/main/resources/aspnetcore/icontroller.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ using {{packageName}}.Models;
1717
/// <summary>
1818
/// {{#summary}}{{summary}}{{/summary}}
1919
/// </summary>
20-
{{#notes}}/// <remarks>{{notes}}</remarks>{{/notes}}{{#parameters}}
21-
/// <param name="{{paramName}}">{{description}}</param>{{/parameters}}{{#responses}}
20+
{{#notes}}/// <remarks>{{notes}}</remarks>{{/notes}}{{#allParams}}
21+
/// <param name="{{paramName}}">{{description}}</param>{{/allParams}}{{#responses}}
2222
/// <response code="{{code}}">{{message}}</response>{{/responses}}
23-
IActionResult {{operationId}}({{#parameters}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/parameters}});
23+
IActionResult {{operationId}}({{#allParams}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
2424
{{/operation}}
2525
}
2626
{{/operations}}

0 commit comments

Comments
 (0)