Skip to content

ServicaStack.Swagger captures only the first route in service #1

@RTS-tender

Description

@RTS-tender

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions