Created by: randomswdev
Implementing two minor changes:
- When extracting the parameter value use
baseName
instead ofparamName
. The two variables usually are not different, but there is a difference in case the path parameter name includes a special character like a-
. For example in:/api/resource/{resource-id}
baseName
is equal toresource-id
, whileparamName
is eqaul toresourceId
. Using the latter is incorrect. - When failing to parse a parameter, like for example when the code expects an integer and parsing the integer fails, I would think it is more appropriate to return StatusBadParam isntead of StatusServerInternalError, because the failure was caused by the client sending invalid data and not because of an issue on the server.
@antihax @grokify @kemokemo @bkabrda