C# Aspnetcore Generator. Fix Parameters missing (Name = ) Property (#8826)

* Fix parameter Name= missing.

* Update samples

* Fix wrong name in template

* Update samples again
This commit is contained in:
Blackclaws 2021-02-25 16:36:35 +01:00 committed by GitHub
parent 3e9c1e1fc3
commit f8770d7c33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 57 additions and 57 deletions

View File

@ -1 +1 @@
{{#isFormParam}}[FromForm]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} {{#isFormParam}}[FromForm (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}}

View File

@ -1 +1 @@
{{#isPathParam}}[FromRoute]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} {{#isPathParam}}[FromRoute (Name = "{{baseName}}")]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}}

View File

@ -1 +1 @@
{{#isQueryParam}}[FromQuery]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} {{#isQueryParam}}[FromQuery (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}}

View File

@ -1 +1 @@
{{#isFormParam}}[FromForm]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} {{#isFormParam}}[FromForm (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}}

View File

@ -1 +1 @@
{{#isPathParam}}[FromRoute]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} {{#isPathParam}}[FromRoute (Name = "{{baseName}}")]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}}

View File

@ -1 +1 @@
{{#isQueryParam}}[FromQuery]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} {{#isQueryParam}}[FromQuery (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}}

View File

@ -1 +1 @@
{{#isFormParam}}[FromForm]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} {{#isFormParam}}[FromForm (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}}

View File

@ -1 +1 @@
{{#isPathParam}}[FromRoute]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} {{#isPathParam}}[FromRoute (Name = "{{baseName}}")]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}}

View File

@ -1 +1 @@
{{#isQueryParam}}[FromQuery]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} {{#isQueryParam}}[FromQuery (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}}

View File

@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/pet/{petId}")] [Route("/v2/pet/{petId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeletePet")] [SwaggerOperation("DeletePet")]
public virtual IActionResult DeletePet([FromRoute][Required]long petId, [FromHeader]string apiKey) public virtual IActionResult DeletePet([FromRoute (Name = "petId")][Required]long petId, [FromHeader]string apiKey)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("FindPetsByStatus")] [SwaggerOperation("FindPetsByStatus")]
[SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")]
public virtual IActionResult FindPetsByStatus([FromQuery][Required()]List<string> status) public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Required()]List<string> status)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -106,7 +106,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("FindPetsByTags")] [SwaggerOperation("FindPetsByTags")]
[SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")]
public virtual IActionResult FindPetsByTags([FromQuery][Required()]List<string> tags) public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required()]List<string> tags)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -138,7 +138,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetPetById")] [SwaggerOperation("GetPetById")]
[SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")]
public virtual IActionResult GetPetById([FromRoute][Required]long petId) public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]long petId)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/pet/{petId}")] [Route("/v2/pet/{petId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UpdatePetWithForm")] [SwaggerOperation("UpdatePetWithForm")]
public virtual IActionResult UpdatePetWithForm([FromRoute][Required]long petId, [FromForm]string name, [FromForm]string status) public virtual IActionResult UpdatePetWithForm([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "name")]string name, [FromForm (Name = "status")]string status)
{ {
//TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -214,7 +214,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UploadFile")] [SwaggerOperation("UploadFile")]
[SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")]
public virtual IActionResult UploadFile([FromRoute][Required]long petId, [FromForm]string additionalMetadata, [FromForm]System.IO.Stream file) public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "additionalMetadata")]string additionalMetadata, [FromForm (Name = "file")]System.IO.Stream file)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/store/order/{orderId}")] [Route("/v2/store/order/{orderId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeleteOrder")] [SwaggerOperation("DeleteOrder")]
public virtual IActionResult DeleteOrder([FromRoute][Required]string orderId) public virtual IActionResult DeleteOrder([FromRoute (Name = "orderId")][Required]string orderId)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetOrderById")] [SwaggerOperation("GetOrderById")]
[SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")]
public virtual IActionResult GetOrderById([FromRoute][Required][Range(1, 5)]long orderId) public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Required][Range(1, 5)]long orderId)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -93,7 +93,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/user/{username}")] [Route("/v2/user/{username}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeleteUser")] [SwaggerOperation("DeleteUser")]
public virtual IActionResult DeleteUser([FromRoute][Required]string username) public virtual IActionResult DeleteUser([FromRoute (Name = "username")][Required]string username)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -116,7 +116,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetUserByName")] [SwaggerOperation("GetUserByName")]
[SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")]
public virtual IActionResult GetUserByName([FromRoute][Required]string username) public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Required]string username)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -148,7 +148,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("LoginUser")] [SwaggerOperation("LoginUser")]
[SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")]
public virtual IActionResult LoginUser([FromQuery][Required()]string username, [FromQuery][Required()]string password) public virtual IActionResult LoginUser([FromQuery (Name = "username")][Required()]string username, [FromQuery (Name = "password")][Required()]string password)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/user/{username}")] [Route("/v2/user/{username}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UpdateUser")] [SwaggerOperation("UpdateUser")]
public virtual IActionResult UpdateUser([FromRoute][Required]string username, [FromBody]User body) public virtual IActionResult UpdateUser([FromRoute (Name = "username")][Required]string username, [FromBody]User body)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/pet/{petId}")] [Route("/v2/pet/{petId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeletePet")] [SwaggerOperation("DeletePet")]
public virtual IActionResult DeletePet([FromRoute][Required]long petId, [FromHeader]string apiKey) public virtual IActionResult DeletePet([FromRoute (Name = "petId")][Required]long petId, [FromHeader]string apiKey)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("FindPetsByStatus")] [SwaggerOperation("FindPetsByStatus")]
[SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")]
public virtual IActionResult FindPetsByStatus([FromQuery][Required()]List<string> status) public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Required()]List<string> status)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -106,7 +106,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("FindPetsByTags")] [SwaggerOperation("FindPetsByTags")]
[SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")]
public virtual IActionResult FindPetsByTags([FromQuery][Required()]List<string> tags) public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required()]List<string> tags)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -138,7 +138,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetPetById")] [SwaggerOperation("GetPetById")]
[SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")]
public virtual IActionResult GetPetById([FromRoute][Required]long petId) public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]long petId)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/pet/{petId}")] [Route("/v2/pet/{petId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UpdatePetWithForm")] [SwaggerOperation("UpdatePetWithForm")]
public virtual IActionResult UpdatePetWithForm([FromRoute][Required]long petId, [FromForm]string name, [FromForm]string status) public virtual IActionResult UpdatePetWithForm([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "name")]string name, [FromForm (Name = "status")]string status)
{ {
//TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -214,7 +214,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UploadFile")] [SwaggerOperation("UploadFile")]
[SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")]
public virtual IActionResult UploadFile([FromRoute][Required]long petId, [FromForm]string additionalMetadata, [FromForm]System.IO.Stream file) public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "additionalMetadata")]string additionalMetadata, [FromForm (Name = "file")]System.IO.Stream file)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/store/order/{orderId}")] [Route("/v2/store/order/{orderId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeleteOrder")] [SwaggerOperation("DeleteOrder")]
public virtual IActionResult DeleteOrder([FromRoute][Required]string orderId) public virtual IActionResult DeleteOrder([FromRoute (Name = "orderId")][Required]string orderId)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetOrderById")] [SwaggerOperation("GetOrderById")]
[SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")]
public virtual IActionResult GetOrderById([FromRoute][Required][Range(1, 5)]long orderId) public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Required][Range(1, 5)]long orderId)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -93,7 +93,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/user/{username}")] [Route("/v2/user/{username}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeleteUser")] [SwaggerOperation("DeleteUser")]
public virtual IActionResult DeleteUser([FromRoute][Required]string username) public virtual IActionResult DeleteUser([FromRoute (Name = "username")][Required]string username)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -116,7 +116,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetUserByName")] [SwaggerOperation("GetUserByName")]
[SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")]
public virtual IActionResult GetUserByName([FromRoute][Required]string username) public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Required]string username)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -148,7 +148,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("LoginUser")] [SwaggerOperation("LoginUser")]
[SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")]
public virtual IActionResult LoginUser([FromQuery][Required()]string username, [FromQuery][Required()]string password) public virtual IActionResult LoginUser([FromQuery (Name = "username")][Required()]string username, [FromQuery (Name = "password")][Required()]string password)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/user/{username}")] [Route("/v2/user/{username}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UpdateUser")] [SwaggerOperation("UpdateUser")]
public virtual IActionResult UpdateUser([FromRoute][Required]string username, [FromBody]User body) public virtual IActionResult UpdateUser([FromRoute (Name = "username")][Required]string username, [FromBody]User body)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/pet/{petId}")] [Route("/v2/pet/{petId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeletePet")] [SwaggerOperation("DeletePet")]
public virtual IActionResult DeletePet([FromRoute][Required]long petId, [FromHeader]string apiKey) public virtual IActionResult DeletePet([FromRoute (Name = "petId")][Required]long petId, [FromHeader]string apiKey)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("FindPetsByStatus")] [SwaggerOperation("FindPetsByStatus")]
[SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")]
public virtual IActionResult FindPetsByStatus([FromQuery][Required()]List<string> status) public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Required()]List<string> status)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -117,7 +117,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("FindPetsByTags")] [SwaggerOperation("FindPetsByTags")]
[SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")]
public virtual IActionResult FindPetsByTags([FromQuery][Required()]List<string> tags) public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required()]List<string> tags)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -149,7 +149,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetPetById")] [SwaggerOperation("GetPetById")]
[SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")]
public virtual IActionResult GetPetById([FromRoute][Required]long petId) public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]long petId)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -215,7 +215,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/pet/{petId}")] [Route("/v2/pet/{petId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UpdatePetWithForm")] [SwaggerOperation("UpdatePetWithForm")]
public virtual IActionResult UpdatePetWithForm([FromRoute][Required]long petId, [FromForm]string name, [FromForm]string status) public virtual IActionResult UpdatePetWithForm([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "name")]string name, [FromForm (Name = "status")]string status)
{ {
//TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -236,7 +236,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UploadFile")] [SwaggerOperation("UploadFile")]
[SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")]
public virtual IActionResult UploadFile([FromRoute][Required]long petId, [FromForm]string additionalMetadata, [FromForm]System.IO.Stream file) public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "additionalMetadata")]string additionalMetadata, [FromForm (Name = "file")]System.IO.Stream file)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/store/order/{orderId}")] [Route("/v2/store/order/{orderId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeleteOrder")] [SwaggerOperation("DeleteOrder")]
public virtual IActionResult DeleteOrder([FromRoute][Required]string orderId) public virtual IActionResult DeleteOrder([FromRoute (Name = "orderId")][Required]string orderId)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetOrderById")] [SwaggerOperation("GetOrderById")]
[SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")]
public virtual IActionResult GetOrderById([FromRoute][Required][Range(1, 5)]long orderId) public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Required][Range(1, 5)]long orderId)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -97,7 +97,7 @@ namespace Org.OpenAPITools.Controllers
[Authorize(Policy = "api_key")] [Authorize(Policy = "api_key")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeleteUser")] [SwaggerOperation("DeleteUser")]
public virtual IActionResult DeleteUser([FromRoute][Required]string username) public virtual IActionResult DeleteUser([FromRoute (Name = "username")][Required]string username)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -120,7 +120,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetUserByName")] [SwaggerOperation("GetUserByName")]
[SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")]
public virtual IActionResult GetUserByName([FromRoute][Required]string username) public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Required]string username)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("LoginUser")] [SwaggerOperation("LoginUser")]
[SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")]
public virtual IActionResult LoginUser([FromQuery][Required()][RegularExpression("^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")]string username, [FromQuery][Required()]string password) public virtual IActionResult LoginUser([FromQuery (Name = "username")][Required()][RegularExpression("^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")]string username, [FromQuery (Name = "password")][Required()]string password)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -199,7 +199,7 @@ namespace Org.OpenAPITools.Controllers
[Authorize(Policy = "api_key")] [Authorize(Policy = "api_key")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UpdateUser")] [SwaggerOperation("UpdateUser")]
public virtual IActionResult UpdateUser([FromRoute][Required]string username, [FromBody]User user) public virtual IActionResult UpdateUser([FromRoute (Name = "username")][Required]string username, [FromBody]User user)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/pet/{petId}")] [Route("/v2/pet/{petId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeletePet")] [SwaggerOperation("DeletePet")]
public virtual IActionResult DeletePet([FromRoute][Required]long petId, [FromHeader]string apiKey) public virtual IActionResult DeletePet([FromRoute (Name = "petId")][Required]long petId, [FromHeader]string apiKey)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("FindPetsByStatus")] [SwaggerOperation("FindPetsByStatus")]
[SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")]
public virtual IActionResult FindPetsByStatus([FromQuery][Required()]List<string> status) public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Required()]List<string> status)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -106,7 +106,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("FindPetsByTags")] [SwaggerOperation("FindPetsByTags")]
[SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")]
public virtual IActionResult FindPetsByTags([FromQuery][Required()]List<string> tags) public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required()]List<string> tags)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -138,7 +138,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetPetById")] [SwaggerOperation("GetPetById")]
[SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")]
public virtual IActionResult GetPetById([FromRoute][Required]long petId) public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]long petId)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/pet/{petId}")] [Route("/v2/pet/{petId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UpdatePetWithForm")] [SwaggerOperation("UpdatePetWithForm")]
public virtual IActionResult UpdatePetWithForm([FromRoute][Required]long petId, [FromForm]string name, [FromForm]string status) public virtual IActionResult UpdatePetWithForm([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "name")]string name, [FromForm (Name = "status")]string status)
{ {
//TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -214,7 +214,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UploadFile")] [SwaggerOperation("UploadFile")]
[SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")]
public virtual IActionResult UploadFile([FromRoute][Required]long petId, [FromForm]string additionalMetadata, [FromForm]System.IO.Stream file) public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "additionalMetadata")]string additionalMetadata, [FromForm (Name = "file")]System.IO.Stream file)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/store/order/{orderId}")] [Route("/v2/store/order/{orderId}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeleteOrder")] [SwaggerOperation("DeleteOrder")]
public virtual IActionResult DeleteOrder([FromRoute][Required]string orderId) public virtual IActionResult DeleteOrder([FromRoute (Name = "orderId")][Required]string orderId)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetOrderById")] [SwaggerOperation("GetOrderById")]
[SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")]
public virtual IActionResult GetOrderById([FromRoute][Required][Range(1, 5)]long orderId) public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Required][Range(1, 5)]long orderId)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...

View File

@ -93,7 +93,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/user/{username}")] [Route("/v2/user/{username}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("DeleteUser")] [SwaggerOperation("DeleteUser")]
public virtual IActionResult DeleteUser([FromRoute][Required]string username) public virtual IActionResult DeleteUser([FromRoute (Name = "username")][Required]string username)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -116,7 +116,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("GetUserByName")] [SwaggerOperation("GetUserByName")]
[SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")]
public virtual IActionResult GetUserByName([FromRoute][Required]string username) public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Required]string username)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -148,7 +148,7 @@ namespace Org.OpenAPITools.Controllers
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("LoginUser")] [SwaggerOperation("LoginUser")]
[SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")] [SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")]
public virtual IActionResult LoginUser([FromQuery][Required()]string username, [FromQuery][Required()]string password) public virtual IActionResult LoginUser([FromQuery (Name = "username")][Required()]string username, [FromQuery (Name = "password")][Required()]string password)
{ {
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Controllers
[Route("/v2/user/{username}")] [Route("/v2/user/{username}")]
[ValidateModelState] [ValidateModelState]
[SwaggerOperation("UpdateUser")] [SwaggerOperation("UpdateUser")]
public virtual IActionResult UpdateUser([FromRoute][Required]string username, [FromBody]User body) public virtual IActionResult UpdateUser([FromRoute (Name = "username")][Required]string username, [FromBody]User body)
{ {
//TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ...