UriTemplate

object UriTemplate extends UriTemplateCompanionPlatform
Companion
class
trait Product
trait Mirror
trait UriTemplateCompanionPlatform
class Object
trait Matchable
class Any

Type members

Classlikes

sealed trait ExpansionType

URI Templates are similar to a macro language with a fixed set of macro definitions: the expression type determines the expansion process.

URI Templates are similar to a macro language with a fixed set of macro definitions: the expression type determines the expansion process.

The default expression type is simple string expansion (Level 1), wherein a single named variable is replaced by its value as a string after pct-encoding any characters not in the set of unreserved URI characters (<a href="http://tools.ietf.org/html/rfc6570#section-1.5">Section 1.5</a>).

Level 2 templates add the plus ("+") operator, for expansion of values that are allowed to include reserved URI characters (<a href="http://tools.ietf.org/html/rfc6570#section-1.5">Section 1.5</a>), and the crosshatch ("#") operator for expansion of fragment identifiers.

Level 3 templates allow multiple variables per expression, each separated by a comma, and add more complex operators for dot-prefixed labels, slash-prefixed path segments, semicolon-prefixed path parameters, and the form-style construction of a query syntax consisting of name=value pairs that are separated by an ampersand character.

sealed trait FragmentDef
final case class FragmentElm(value: String) extends FragmentDef

Static fragment element

Static fragment element

final case class MultiFragmentExp(names: List[String]) extends FragmentDef

Fragment expansion with multiple variables, crosshatch-prefixed (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.4">Section 3.2.4</a>)

Fragment expansion with multiple variables, crosshatch-prefixed (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.4">Section 3.2.4</a>)

Companion
object
Companion
class
final case class ParamContExp(names: List[String]) extends QueryExp

Form-style query continuation (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.9">Section 3.2.9</a>)

Form-style query continuation (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.9">Section 3.2.9</a>)

Companion
object
object ParamContExp
Companion
class
final case class ParamElm(name: String, values: List[String]) extends QueryDef

Static query parameter element

Static query parameter element

Companion
object
object ParamElm
Companion
class
final case class ParamExp(names: List[String]) extends QueryExp

Form-style query, ampersand-separated (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.8">Section 3.2.8</a>)

Form-style query, ampersand-separated (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.8">Section 3.2.8</a>)

Companion
object
object ParamExp
Companion
class
final case class ParamReservedExp(name: String, variables: List[String]) extends QueryDef

Reserved string expansion for query parameter

Reserved string expansion for query parameter

Companion
object
Companion
class
final case class ParamVarExp(name: String, variables: List[String]) extends QueryDef

Simple string expansion for query parameter

Simple string expansion for query parameter

Companion
object
object ParamVarExp
Companion
class
sealed trait PathDef
final case class PathElm(value: String) extends PathDef

Static path element

Static path element

final case class PathExp(names: List[String]) extends PathDef

Path segments, slash-prefixed (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.6">Section 3.2.6</a>)

Path segments, slash-prefixed (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.6">Section 3.2.6</a>)

Companion
object
object PathExp
Companion
class
sealed trait QueryDef
sealed trait QueryExp extends QueryDef
final case class ReservedExp(names: List[String]) extends PathDef

Level 2 allows reserved string expansion (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.3">Section 3.2.3</a>)

Level 2 allows reserved string expansion (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.3">Section 3.2.3</a>)

Level 3 allows reserved expansion with multiple variables (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.3">Section 3.2.3</a>)

Companion
object
object ReservedExp
Companion
class
final case class SimpleFragmentExp(name: String) extends FragmentDef

Fragment expansion, crosshatch-prefixed (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.4">Section 3.2.4</a>)

Fragment expansion, crosshatch-prefixed (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.4">Section 3.2.4</a>)

final case class VarExp(names: List[String]) extends PathDef

Level 1 allows string expansion (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.2">Section 3.2.2</a>)

Level 1 allows string expansion (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.2">Section 3.2.2</a>)

Level 3 allows string expansion with multiple variables (<a href="http://tools.ietf.org/html/rfc6570#section-3.2.2">Section 3.2.2</a>)

Companion
object
object VarExp
Companion
class

Types

type Fragment = List[FragmentDef]
type Path = List[PathDef]
type Query = List[QueryDef]

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def isUnreserved(s: String): Boolean
def isUnreservedOrEncoded(s: String): Boolean