-
Notifications
You must be signed in to change notification settings - Fork 0
Swagger API
Swagger is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services. ServiceStack implements basic API and available as a separate NuGet package: ServiceStack.Api.Swagger or StackExpress.Api.Swagger (unstable build).
Default configuration expects that ServiceStack services are available under '/api' path. If it's a brand new MVC project install NuGet Package: (http://nuget.org/packages/ServiceStack.Host.Mvc/) which prepares ServiceStack default services. Make sure that you added ignore for MVC routes:
routes.IgnoreRoute("api/{*pathInfo}"); If it's MVC4 project, then don't forget to disable WebAPI:
//WebApiConfig.Register(GlobalConfiguration.Configuration);Enable Swagger plugin in AppHost.cs with:
public override void Configure(Container container)
{
...
Plugins.Add(new SwaggerFeature());
// uncomment CORS feature if it's has to be available from external sites
//Plugins.Add(new CorsFeature());
...
}Compile it. Now you can access swagger UI with:
(http://localost:port/swagger-ui/index.html)
or
- Why ServiceStack?
- What is a message based web service?
- Advantages of message based web services
- Why remote services should use separate DTOs
- Getting Started
- Reference
- Clients
- Formats
- View Engines 4. Razor & Markdown Razor
- Hosts
- Security
- Advanced
- Configuration options
- Access HTTP specific features in services
- Logging
- Serialization/deserialization
- Request/response filters
- Filter attributes
- Concurrency Model
- Built-in caching options
- Built-in profiling
- Form Hijacking Prevention
- Auto-Mapping
- HTTP Utils
- Virtual File System
- Config API
- Physical Project Structure
- Modularizing Services
- MVC Integration
- Plugins 3. Request logger 4. Swagger API
- Tests
- Other Languages
- Use Cases
- Performance
- How To
- Future