Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Issue: [HelpPage]ApiExplorer throws exception when trying to expand uri parameters [1683]

$
0
0
Reported by user here:
http://aspnetwebstack.codeplex.com/discussions/531690

_Scenario_:
```
public class OneRequest
{
public string Id { get; set; }

public string Name { get; set; }
}


public class ValuesController : ApiController
{
[HttpGet]
[Route("api/values/{Id}")]
public IHttpActionResult GetOne([FromUri] OneRequest request)
{
return Ok(request);
}
}
```

_Workaround_:
- Remove the Id property from the complex type
- Change the action to be:
public IHttpActionResult GetOne(int id, [FromUri] OneRequest request)

_Attached_ a Owin Selfhost repro.

_Note_: The dictionary called "parameterValuesForRoute" in the TryExpandUriParameters method of ApiExplorer class should use case-INsensitive way of comparing keys.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>