on master help sign in
Removed long doc
7fe7a7diko
denis/docs/Docs.hs+4−7
@@ -25,19 +25,16 @@ import qualified Data.Text.IO as T
25import Servant.Server.Experimental.Auth
25import Servant.Server.Experimental.Auth
26import Network.Wai
26import Network.Wai
27import Server.API.Messages
27import Server.API.Messages
28−
29−docsWriterLong :: HasDocs api => String -> Proxy api -> IO ()
30−docsWriterLong file = writeFile ("docs/" ++ file ++ ".md") . normalizer . markdown . flip docsWithOptions (DocOptions 15)
31docsWriter :: HasDocs api => String -> Proxy api -> IO ()
28docsWriter :: HasDocs api => String -> Proxy api -> IO ()
32docsWriter file = writeFile ("docs/" ++ file ++ ".md") . normalizer . markdown . docs
29docsWriter file = writeFile ("docs/" ++ file ++ ".md") . normalizer . markdown . docs
33
30
34main = do
31main = do
35− docsWriterLong "posts" $ pretty (Proxy :: Proxy ("posts" :> PostApi))
32+ docsWriter "posts" $ pretty (Proxy :: Proxy ("posts" :> PostApi))
36− docsWriterLong "messages" $ pretty (Proxy :: Proxy (MessagesApi))
33+ docsWriter "messages" $ pretty (Proxy :: Proxy (MessagesApi))
37 docsWriter "all" $ pretty serverProxy
34 docsWriter "all" $ pretty serverProxy
38− docsWriterLong "authentication" $ pretty (Proxy :: Proxy ("authentication" :> AuthenticationHandler :<|>
35+ docsWriter "authentication" $ pretty (Proxy :: Proxy ("authentication" :> AuthenticationHandler :<|>
39 Authentication :> "authentication" :> "me" :> Post '[JSON] UserId ))
36 Authentication :> "authentication" :> "me" :> Post '[JSON] UserId ))
40− docsWriterLong "channels" $ pretty (Proxy :: Proxy ("channels" :> ChannelsApi))
37+ docsWriter "channels" $ pretty (Proxy :: Proxy ("channels" :> ChannelsApi))
41 T.writeFile ("docs/Home.md") . (\t -> "```\n" <> t <> "```\n") $ layoutWithContext serverProxy (undefined :: Context (AuthHandler Request UserId ': '[]))
38 T.writeFile ("docs/Home.md") . (\t -> "```\n" <> t <> "```\n") $ layoutWithContext serverProxy (undefined :: Context (AuthHandler Request UserId ': '[]))
42
39
43
40