scrutinator-core

Request binding in Scalatra with help from Shapeless

License

License

Categories

Categories

Net
GroupId

GroupId

net.ceedubs
ArtifactId

ArtifactId

scrutinator-core_2.10
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

scrutinator-core
Request binding in Scalatra with help from Shapeless
Project URL

Project URL

https://github.com/ceedubs/scrutinator
Project Organization

Project Organization

net.ceedubs
Source Code Management

Source Code Management

https://github.com/ceedubs/scrutinator

Download scrutinator-core_2.10

How to add to project

<!-- https://jarcasting.com/artifacts/net.ceedubs/scrutinator-core_2.10/ -->
<dependency>
    <groupId>net.ceedubs</groupId>
    <artifactId>scrutinator-core_2.10</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.ceedubs/scrutinator-core_2.10/
implementation 'net.ceedubs:scrutinator-core_2.10:0.1.2'
// https://jarcasting.com/artifacts/net.ceedubs/scrutinator-core_2.10/
implementation ("net.ceedubs:scrutinator-core_2.10:0.1.2")
'net.ceedubs:scrutinator-core_2.10:jar:0.1.2'
<dependency org="net.ceedubs" name="scrutinator-core_2.10" rev="0.1.2">
  <artifact name="scrutinator-core_2.10" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.ceedubs', module='scrutinator-core_2.10', version='0.1.2')
)
libraryDependencies += "net.ceedubs" % "scrutinator-core_2.10" % "0.1.2"
[net.ceedubs/scrutinator-core_2.10 "0.1.2"]

Dependencies

compile (6)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.10.4
org.scalatra : scalatra_2.10 jar 2.3.0
org.scalaz : scalaz-core_2.10 jar 7.0.6
com.chuusai : shapeless_2.10.4 jar 2.0.0
org.typelevel : shapeless-scalaz_2.10 jar 0.2
javax.servlet : javax.servlet-api jar 3.1.0

test (2)

Group / Artifact Type Version
org.specs2 : specs2_2.10 jar 2.3.11
org.scalacheck : scalacheck_2.10 jar 1.11.3

Project Modules

There are no modules declared in this project.

Scrutinator

Scrutinator is a request binding/validation library with an emphasis on type safety.

Principles

  1. As type-safe as possible
    • Optional values without a provided default are Options, other values are not
    • Shouldn't be allowed to request something that hasn't been bound from the request yet
    • Shouldn't be allowed to ask for a type to be bound from the request if there isn't evidence that we can perform that binding
    • When I ask for params("age"), since I have specified the "age" field, the result should be typed to an int
    • When I ask for params("name"), since I have specified the "name" field, the result should be typed to a string
    • When I ask for params("oops"), since I have not specified an "oops" param, I should get a compile error
  2. Convenient - should be able to bind multiple values at once and get a Validation of the sequenced individual validations
  3. Swagger integration - bindings can be used to generate Swagger specs

Contact

Versions

Version
0.1.2
0.1.1
0.1.0