I found mention of swagger in the Introductory Slides. But nowhere else. Is is something not finished yet?
Edit: Apparently it's on To Do List.
Is there any good way to document the RestAPI automatically?
Swagger (OpenAPI) is a language-agnostic specification for describing REST APIs. It allows both computers and humans to understand the capabilities of a REST API without direct access to the source code. Its main goals are to: Minimize the amount of work needed to connect decoupled services.
To enable Swagger for your Service Stack, follow the Swagger API page on Service Stack wiki.
Install-Package ServiceStack.Api.Swagger
in your package manager console.Enable Swagger plugin in your AppHost.cs with:
using ServiceStack.Api.Swagger;
public override void Configure(Container container)
{
...
Plugins.Add(new SwaggerFeature());
...
}
Access Swagger UI with http://localhost:port/swagger-ui/index.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With