I'm new to quiet services, and I just implemented a test code to get a ServiceStack service that works with the Swagger plugin, which also fails me ...
inside swagger-ui / index.html there is a field for 'api_key'. I know that the variable name is umm ... a variable, and I can set it too as I like, but I'm a little confused about what it is used for and whether I should use it.
Also, if I use it, how does servicestack represent this value for me on the server side?
Here is the test service I got from the documentation ...
[Api("Hello Web Services")] [Route("/Hello", Summary = @"Noel ServiceStackSwagger thingy", Notes = "Some more info in here cause these are notes")] [Route("/Hello/{name}", Summary = @"N031'5 ServiceStackSwagger thingy", Notes = "Some more info in here cause these are notes", Verbs="GET,POST" )] public class Hello { [ApiMember(Name = "Name", Description = "This is a description", ParameterType = "path", DataType = "string", Verb="GET,POST")] public string Name { get; set; } } public class HelloResponse { public string Result { get; set; } } public class HelloService : Service { public object Any(Hello request) { return new HelloResponse { Result = "Hello, " + request.Name }; } }
source share