Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
@RTS-tender

Description

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

        AltStyle によって変換されたページ (->オリジナル) /