haskell-servant / haskell-servant/servant
JS code generation fails when Api contains BasicAuth
- Dominant language
- Haskell
- Stars
- 2k
- Forks
- 427
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 5
Description
`writeJSForAPI` fails to type check after I add `BasicAuth` to my api.
```
/Users/kseo/KodeBoxProjects/kodebox-server/jsgen/Main.hs: 21, 15
• No instance for (servant-foreign-0.8.1:Servant.Foreign.Internal.HasForeign
NoTypes
Servant.API.ContentTypes.NoContent
(Servant.API.BasicAuth.BasicAuth
"kodebox-realm" Kodebox.Server.Types.Session
Servant.API.Sub.:> Kodebox.Server.Api.PrivateApi))
arising from a use of ‘writeJSForAPI’
• In the expression:
writeJSForAPI
restApi vanillaJS (joinPath [outputDir, "Kodebox.js"])
In an equation for ‘writeJSCode’:
writeJSCode
= writeJSForAPI
restApi vanillaJS (joinPath [outputDir, "Kodebox.js"])
```
Contributor guide
Assessment
This issue has not been assessed yet.