| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
WebGear.OpenApi.Handler
Description
Synopsis
- newtype OpenApiHandler m a b = OpenApiHandler (OpenApi -> State Documentation OpenApi)
- 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 => OpenApi -> m OpenApi
- addRootPath :: OpenApi -> OpenApi
- toOpenApi :: OpenApiHandler m a b -> OpenApi
Documentation
newtype OpenApiHandler m a b Source #
A handler that captures OpenApi documentation of API specifications.
Constructors
| OpenApiHandler (OpenApi -> State Documentation OpenApi) |
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 => OpenApi -> m OpenApi Source #
addRootPath :: OpenApi -> OpenApi Source #
toOpenApi :: OpenApiHandler m a b -> OpenApi Source #
Generate OpenApi documentation from a handler