WebGear is a Haskell library for building composable, type-safe HTTP APIs.
This is the main repository of WebGear project. It contains multiple packages:
-
webgear-core
: The core library. -
webgear-server
: Serve WebGear applications usingwai
andwarp
. -
webgear-swagger
: Generate Swagger 2.0 specifications from WebGear specifications. -
webgear-swagger-ui
: Server to host swagger UI based on WebGear APIs. -
webgear-openapi
: Generate OpenAPI specifications from WebGear specifications.
Examples of WebGear applications can be found at:
- https://github.com/haskell-webgear/webgear/webgear-example-users
- https://github.com/haskell-webgear/webgear/webgear-example-realworld
Documentation is available at https://haskell-webgear.github.io
Use Nix to start a reproducible development environment:
nix develop
This starts a shell with the default GHC. You can also use a specific GHC version with:
nix develop .#webgear-dev-ghc<GHC-VERSION>
You can use the standard cabal commands in the development shell.
You can build packages using Nix:
nix build \
.#webgear-core-ghc<GHC-VERSION> \
.#webgear-server-ghc<GHC-VERSION> \
.#webgear-swagger-ghc<GHC-VERSION> \
.#webgear-swagger-ui-ghc<GHC-VERSION> \
.#webgear-openapi-ghc<GHC-VERSION>