Hi Ofir,
Which swagger-related library are you using? Is this generated code? Whether type checking is your responsibility or not depends on that. From: <[email protected]> on behalf of Ofir Green <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Monday, 31 October 2016 at 1:36 To: Swagger <[email protected]> Subject: Using swagger ASP core server controller - crashes if receives wrong type. Hi, This might be a trivial question but I still find it odd. So say I have a GET operation that expects an integer 'FromRoute' something like: [HttpGet] [Route("/api/nodes/{id}")] [SwaggerOperation("FindNodeById")] [SwaggerResponse(200, type: typeof(Node))] public virtual IActionResult FindNodeById([FromRoute] int id) but when I give it a string, the entire server crashes. Now I would expect to have an unexpected behavior but is there no type checking? basically what this means is that a "user" can maliciously or accidentally crash the entire server. is the type checking my responsibility? Thanks. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
