Safe Haskell | None |
---|---|
Language | Haskell2010 |
WebGear.OpenApi.Handler
Description
Synopsis
- newtype OpenApiHandler (m :: k) (a :: k1) (b :: k2) = 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 :: forall {k1} {k2} {k3} (m :: k1) (a :: k2) (b :: k3). OpenApiHandler m a b -> OpenApi
Documentation
newtype OpenApiHandler (m :: k) (a :: k1) (b :: k2) 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 :: forall {k1} {k2} {k3} (m :: k1) (a :: k2) (b :: k3). OpenApiHandler m a b -> OpenApi Source #
Generate OpenApi documentation from a handler