Skip to content

Commit

Permalink
use allParams instead parameters element, in order to fix issue w…
Browse files Browse the repository at this point in the history
…ith method empty of arguments.
  • Loading branch information
HugoMario authored and frantuma committed Jun 27, 2019
1 parent 8df9f97 commit f6bd6c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ namespace {{packageName}}.Controllers
{ {{#operation}}
/// <summary>
/// {{#summary}}{{summary}}{{/summary}}
/// </summary>{{#notes}}
/// <remarks>{{notes}}</remarks>{{/notes}}{{#parameters}}
/// <param name="{{paramName}}">{{description}}</param>{{/parameters}}{{#responses}}
/// </summary>
{{#notes}}/// <remarks>{{notes}}</remarks>{{/notes}}{{#allParams}}
/// <param name="{{paramName}}">{{description}}</param>{{/allParams}}{{#responses}}
/// <response code="{{code}}">{{message}}</response>{{/responses}}
[{{httpMethod}}]
[Route("{{{basePathWithoutHost}}}{{{path}}}")]
Expand All @@ -44,7 +44,7 @@ namespace {{packageName}}.Controllers
[ValidateModelState]
[SwaggerOperation("{{operationId}}")]{{#responses}}{{#dataType}}
[SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{^dataType}}{{/dataType}}{{/responses}}
public virtual IActionResult {{operationId}}({{#parameters}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/parameters}})
public virtual IActionResult {{operationId}}({{#allParams}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
{ {{#responses}}
{{#dataType}}
//TODO: Uncomment the next line to return response {{code}} or use other options such as return this.NotFound(), return this.BadRequest(..), ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ using {{packageName}}.Models;
/// <summary>
/// {{#summary}}{{summary}}{{/summary}}
/// </summary>
{{#notes}}/// <remarks>{{notes}}</remarks>{{/notes}}{{#parameters}}
/// <param name="{{paramName}}">{{description}}</param>{{/parameters}}{{#responses}}
{{#notes}}/// <remarks>{{notes}}</remarks>{{/notes}}{{#allParams}}
/// <param name="{{paramName}}">{{description}}</param>{{/allParams}}{{#responses}}
/// <response code="{{code}}">{{message}}</response>{{/responses}}
IActionResult {{operationId}}({{#parameters}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/parameters}});
IActionResult {{operationId}}({{#allParams}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
{{/operation}}
}
{{/operations}}
Expand Down

0 comments on commit f6bd6c1

Please sign in to comment.