I need to do this
[Route("/api/highfive/{person_name}")]
public IActionResult HighFive(string personName){
//do stuff
}
Is there a way to map variable personName to what is supplied as person_name from the route?
The two below options work -as long as there is a match between route argument and variable name (which makes sense).
[Route("/api/highfive/{person_name}")]
public IActionResult HighFive(string person_name){
//do stuff
}
[Route("/api/highfive/{personName}")]
public IActionResult HighFive(string personName){
//do stuff
}
But why do you want this??
Swagger generates documentation that has to match that of a previous API, this is replacing - and it uses the variable names from route to generate documentation.
using person_name as a variable name is against our naming conventions
Yes it is kind of silly - but if there is an easy fix I am not aware of, that would be awesome.