| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
WebGear.Swagger.Handler
Description
Synopsis
- newtype SwaggerHandler m a b = SwaggerHandler (Swagger -> State Documentation Swagger)
- data Documentation = Documentation !(Maybe Description) !(Maybe Summary)
- consumeDescription :: MonadState Documentation m => m (Maybe Description)
- consumeSummary :: MonadState Documentation m => m (Maybe Summary)
- addRouteDocumentation :: MonadState Documentation m => Swagger -> m Swagger
- addRootPath :: Swagger -> Swagger
- toSwagger :: SwaggerHandler m a b -> Swagger
Documentation
newtype SwaggerHandler m a b Source #
A handler that captures Swagger documentation of API specifications.
Constructors
| SwaggerHandler (Swagger -> State Documentation Swagger) |
Instances
data Documentation Source #
Constructors
| Documentation !(Maybe Description) !(Maybe Summary) |
consumeDescription :: MonadState Documentation m => m (Maybe Description) Source #
consumeSummary :: MonadState Documentation m => m (Maybe Summary) Source #
addRouteDocumentation :: MonadState Documentation m => Swagger -> m Swagger Source #
addRootPath :: Swagger -> Swagger Source #
toSwagger :: SwaggerHandler m a b -> Swagger Source #
Generate Swagger documentation from a handler