{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module Servant.Swagger.UI.JensOleG (
SwaggerSchemaUI,
SwaggerSchemaUI',
jensolegSwaggerSchemaUIServer,
jensolegSwaggerSchemaUIServer',
jensolegIndexTemplate,
jensolegFiles,
) where
import Servant.Swagger.UI.Core
import Data.ByteString (ByteString)
import Data.Swagger (Swagger)
import Data.Text (Text)
import FileEmbedLzma
import Servant
jensolegSwaggerSchemaUIServer
:: (Server api ~ Handler Swagger)
=> Swagger -> Server (SwaggerSchemaUI' dir api)
jensolegSwaggerSchemaUIServer =
swaggerSchemaUIServerImpl jensolegIndexTemplate jensolegFiles
jensolegSwaggerSchemaUIServer'
:: Server api -> Server (SwaggerSchemaUI' dir api)
jensolegSwaggerSchemaUIServer' =
swaggerSchemaUIServerImpl' jensolegIndexTemplate jensolegFiles
jensolegIndexTemplate :: Text
jensolegIndexTemplate = $(embedText "jensoleg.index.html.tmpl")
jensolegFiles :: [(FilePath, ByteString)]
jensolegFiles = $(embedRecursiveDir "jensoleg-dist")