ServiceStack & Swagger - ApiMember as Path and Query -
i'm searching solution following problem, concerning swagger integration in servicestack.
i have requestobject required property id. want provide following routes:
[route("/user/byid/{id}", "get", summary = @"test", notes = "test")] [route("/user/byid", "get", summary = @"test", notes = "test")]
basically should leave choice of providing id in query string or path serviceconsumer.
the swagger ui correctly displays 2 routes, not testable both ways, because api-member attribute not allow specify parametertype 'path' or 'query'.
source: https://gist.github.com/johannesferner/5317496
is there way, provide api-member specification, according route, or define valdid path , query?
like this:
[apimember(name = "id", parametertype="path,query", description = "user id", datatype = "int", isrequired = true)]
in cases find easiest create 2 separate dto classes facilitate documenting each route correctly in swagger. dto classes might have identical properties (id
in case, looks like), , different route
, apimember
attributes. have 2 service methods, 1 each dto, , call shared method, passing in value of id
property, bulk of implementation isn't duplicated.
Servicestack And Swagger - Apimember As Path And Query - >>>>> Download Now
ReplyDelete>>>>> Download Full
Servicestack And Swagger - Apimember As Path And Query - >>>>> Download LINK
>>>>> Download Now
Servicestack And Swagger - Apimember As Path And Query - >>>>> Download Full
>>>>> Download LINK 2h