module Mensam.API.Route.Api.OpenApi where

import Data.Kind
import Data.OpenApi
import GHC.Generics
import Servant.API

type Routes :: Type -> Type
newtype Routes route = Routes
  { forall route.
Routes route
-> route
   :- (Summary "OpenAPI"
       :> (Description
             "This OpenAPI specification is automatically generated from a servant API.\n"
           :> ("openapi" :> Get '[JSON] OpenApi)))
routeJson ::
      route
        :- Summary "OpenAPI"
          :> Description
              "This OpenAPI specification is automatically generated from a servant API.\n"
          :> "openapi"
          :> Get '[JSON] OpenApi
  }
  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)