ServiceStack.UseCases icon indicating copy to clipboard operation
ServiceStack.UseCases copied to clipboard

ServicaStack.Swagger captures only the first route in service

Open RTS-tender opened this issue 12 years ago • 0 comments

Go to HelloText class (or any class that is describing requests to REST service, i.e. HelloImage or Hello - in this particular example). Add one more route for the request.

[Route("/hellotext/{Name}", Summary = "Hello Text Service")] [Route("/abc/{Name}", Summary = "ABC Text Service")] public class HelloText { [ApiMember(Name = "Name", Description = "Name Description", ParameterType = "path", DataType = "string", IsRequired = true)] public string Name { get; set; } }

Go to local swagger-page (localhost:yourport/swagger-ui.html) or to resouces page (localhost:yourport/resources) and you'll see that "/abc/" route is captured and "/hellotext" is not

/resource/abc
/resource/helloimage
/resource/hello

RTS-tender avatar Jan 22 '13 14:01 RTS-tender