RicoSuter/NSwag

[CodeGen] Route Param are case-sensitive

Open

#1,202 opened on Feb 20, 2018

View on GitHub
 (3 comments) (0 reactions) (0 assignees)C# (1,189 forks)batch import
help wantedtype: discussiontype: enhancement

Repository metrics

Stars
 (6,291 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Route params are case-sensitive and fail to be used via code gen.

Example route:

        [HttpGet]
        [Route("foo/{barId}")]
        public async Task<IHttpActionResult> GetPricingRegionDetailAsync(int barid) {}

Example code gen output:

urlBuilder_.Append("foo/{barId}");
urlBuilder_.Replace("{barid}", System.Uri.EscapeDataString(ConvertToString(barid, System.Globalization.CultureInfo.InvariantCulture)));

The replace methid is case sensitive.

Related to #368

Contributor guide