haskell-servant / haskell-servant/servant

JS code generation fails when Api contains BasicAuth

Open
#672 13 comments 0 reactions 1 assignee Claimed by @arianvp View on GitHub
servant-foreign servant-js
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.