module Mensam.API.Route.OpenApi where

import Data.Kind
import GHC.Generics
import Servant.API
import Servant.HTML.Blaze
import Text.Blaze.Html

type Routes :: Type -> Type
newtype Routes route = Routes
  { forall route.
Routes route
-> route
   :- (Summary "View API documentation"
       :> (Description
             "View the OpenAPI documentation in a human-readabable format.\n"
           :> Get '[HTML] Html))
routeRender ::
      route
        :- Summary "View API documentation"
          :> Description
              "View the OpenAPI documentation in a human-readabable format.\n"
          :> Get '[HTML] Html
  }
  deriving stock ((forall x. Routes route -> Rep (Routes route) x)
-> (forall x. Rep (Routes route) x -> Routes route)
-> Generic (Routes route)
forall x. Rep (Routes route) x -> Routes route
forall x. Routes route -> Rep (Routes route) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall route x. Rep (Routes route) x -> Routes route
forall route x. Routes route -> Rep (Routes route) x
$cfrom :: forall route x. Routes route -> Rep (Routes route) x
from :: forall x. Routes route -> Rep (Routes route) x
$cto :: forall route x. Rep (Routes route) x -> Routes route
to :: forall x. Rep (Routes route) x -> Routes route
Generic)