Installation
guardrail is available as a modular core, with both sbt and Maven integration. The core can also be run as a stand-alone CLI application, with full support for all features.
To generate servers or clients using the http4s
framework, set http4s
as the framework in the generation configuration in either sbt or maven.
If compiling with Scala < 2.13.x, you’ll need to enable -Ypartial-unification
:
scalacOptions += "-Ypartial-unification"
If compiling with Scala < 2.12.x, you’ll additionally need the -Xexperimental
flag:
scalacOptions += "-Xexperimental"
Additionally, you will need to manually include dependencies in your project for the following packages:
http4s
, dsl, server, and client dependencieshttp4s-circe
for JSON decoding and encoding supportcirce-generic
for JSON decoding and encoding supportcats-effect
for http4s integrationcats-core
for http4s integration
Versions of these libraries should be picked by checking out the Compatibility Matrix.