Skip to content

RoutePrefix with a "." in it confuses the /help  #131

@RobBeardsworth

Description

@RobBeardsworth

When you run the following code (obviously RandomClass is defined elsewhere):

using System.Web.Http;
using DotInRoutePrefix.Models;

namespace DotInRoutePrefix.Controllers
{
    [RoutePrefix("Start/A.B/End")]
    public class AbController : ApiController
    {
        [Route("Do")]
        public void Post([FromBody]RandomClass value)
        {
        }
    }

    [RoutePrefix("Start/CD/End")]
    public class CdController : ApiController
    {
        [Route("Do")]
        public void Post([FromBody]RandomClass value)
        {
        }
    }
}

and navigate to localhost:nnnn/help, you are offered 2 links:

http://localhost:nnnn/Help/Api/POST-Start-A.B-End-Do (brings a 404)
http://localhost:nnnn/Help/Api/POST-Start-CD-End-Do (brings the expected info)

Post(man)-ing to e.g. http:localhost:nnnn/start/a.b/end/do works fine.

Rob

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions