You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[HttpGet][Route("/items")][ProducesResponseType((int)HttpStatusCode.OK, Type =typeof(TodoPage))]publicvirtualasyncTask<IActionResult>List([FromQuery(Name ="limit")]intlimit=50,[FromQuery(Name ="offset")]intoffset=0){varresult=await TodoItemsOperationsImpl.ListAsync(limit, offset);return Ok(result);}
which is always returning the successful result.
We also defined those errors with some specific status code, which means the server implementation should only return those status code in errors, but the current implementation, we did not really honor this - imagine this, since this controllerBase class is abstract, I must create a derived type, and these methods are virtual therefore I can override them to return any status code I want - if this is the case, we lose the benefit of defining those error status code in the spec.
The text was updated successfully, but these errors were encountered:
The generated controller looks like this:
which is always returning the successful result.
We also defined those errors with some specific status code, which means the server implementation should only return those status code in errors, but the current implementation, we did not really honor this - imagine this, since this controllerBase class is abstract, I must create a derived type, and these methods are virtual therefore I can override them to return any status code I want - if this is the case, we lose the benefit of defining those error status code in the spec.
The text was updated successfully, but these errors were encountered: