servant-named alternatives and similar packages
Based on the "servant" category.
Alternatively, view servant-named alternatives based on common mentions on social networks and blogs.
-
servant
Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! -
servant-elm
Automatically derive Elm functions to query servant webservices -
servant-purescript
Translate servant API to purescript code, with the help of purescript-bridge. -
servant-swagger-ui
Provide embedded swagger UI for servant and swagger -
servant-response
Moved to http://github.com/haskell-servant -
servant-js
Automatically derive javascript functions to query servant webservices. -
servant-auth-cookie
Authentication via encrypted cookies -
servant-aeson-specs
Generically obtain tests for JSON serialization -
servant-pagination
Type-safe pagination for Servant APIs -
servant-github-webhook
Servant combinators for writing secure GitHub webhooks -
servant-pandoc
Render a servant API to Pandoc's native representation -
servant-matrix-param
Matrix parameter combinator for servant -
servant-mock
Derive a mock server for free from your servant API types -
servant-auth-token-leveldb
Servant based API and server for token based authorisation -
servant-auth-token-acid
Servant based API and server for token based authorisation -
servant-jsonrpc
Tools to build JSON-RPC clients and servers the Servant way -
servant-reason
Automatically derive bindings for Servant APIs in Reason -
servant-http2-client
Generate http2-client from Servant APIs -
servant-match
Standalone implementation of servant’s dispatching mechanism -
servant-kotlin
Automatically derive Kotlin functions to query servant webservices -
servant-ruby
Create a Ruby client from a Servant API using Net::HTTP. -
servant-options
Provide responses to OPTIONS requests for Servant applications. -
servant-haxl-client
automatical derivation of querying functions for servant webservices -
servant-generate
Generate default implementations for servers in a flexible way (a.k.a servant-mock on steroids) -
servant-proto-lens
Servant Content-Type for proto-lens protobuf modules. -
servant-multipart
multipart/form-data (e.g file upload) support for servant
InfluxDB - Power Real-Time Data Analytics at Scale
Do you think we are missing an alternative of servant-named or a related project?
README
servant-named
This package aims to address an issue with the amazing servant library, wherein it can be hard to manage two complex lists of API endpoints (one of types, and one of handlers), making sure to keep them in the same order.
To address this, we introduce the concept of named endpoints. When using named endpoints, it's no longer necessary to keep endpoint types and handlers in the same order. When serving the servant application, the types and handlers are automatically matched up according to their names. Here's a little example:
handler :: Server API
handler = fromNamed $ Named @"getUser" := return
::<|> Named @"getUsers" := return [1,2,3]
::<|> Nil
type API = FromNamed ( Named "getUsers" := "user" :> Get '[JSON] [Int]
::<|> Named "getUser" := "user" :> Capture "id" Int :> Get '[JSON] Int
::<|> Nil
)
The endpoints are defined in opposite orders, but this still typechecks and works as expected!