Skip to content

Commit

Permalink
Workaround for HLS not finding files while running template haskell (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaymankar authored May 12, 2022
1 parent 7f1ffb7 commit 98992af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions services/brig/brig.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ library
, errors >=1.4
, exceptions >=0.5
, extended
, file-embed
, file-embed-lzma
, filepath >=1.3
, fsnotify >=0.2
Expand Down
1 change: 1 addition & 0 deletions services/brig/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ library:
- errors >=1.4
- exceptions >=0.5
- extended
- file-embed
- file-embed-lzma
- filepath >=1.3
- fsnotify >=0.2
Expand Down
7 changes: 4 additions & 3 deletions services/brig/src/Brig/API/Public.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import qualified Data.ByteString.Lazy.Char8 as LBS
import Data.CommaSeparatedList (CommaSeparatedList (fromCommaSeparatedList))
import Data.Containers.ListUtils (nubOrd)
import Data.Domain
import Data.FileEmbed
import Data.Handle (Handle, parseHandle)
import Data.Id as Id
import qualified Data.Map.Strict as Map
Expand Down Expand Up @@ -146,7 +147,7 @@ swaggerDocsAPI (Just V2) =
<> CannonAPI.swaggerDoc
)
& S.info . S.title .~ "Wire-Server API"
& S.info . S.description ?~ $(embedText "docs/swagger.md") <> mempty
& S.info . S.description ?~ $(embedText =<< makeRelativeToProject "docs/swagger.md")
& S.security %~ nub
-- sanitise definitions
& S.definitions . traverse %~ sanitise
Expand All @@ -170,12 +171,12 @@ swaggerDocsAPI (Just V0) =
swaggerSchemaUIServer
. fromMaybe Aeson.Null
. Aeson.decode
$ $(embedLazyByteString "docs/swagger-v0.json")
$ $(embedLazyByteString =<< makeRelativeToProject "docs/swagger-v0.json")
swaggerDocsAPI (Just V1) =
swaggerSchemaUIServer
. fromMaybe Aeson.Null
. Aeson.decode
$ $(embedLazyByteString "docs/swagger-v1.json")
$ $(embedLazyByteString =<< makeRelativeToProject "docs/swagger-v1.json")
swaggerDocsAPI Nothing = swaggerDocsAPI (Just maxBound)

servantSitemap :: ServerT BrigAPI (Handler r)
Expand Down

0 comments on commit 98992af

Please sign in to comment.