DataExamples

alloy.DataExamples
object DataExamples extends Newtype[List[DataExample]]

A trait for specifying what example data looks like. Differs from the smithy.api#examples trait in that it can be used for any shape, not just operations. Below is an explanation of the different example formats that are supported.

  1. SMITHY - this means that the examples will be using the Document abstraction and will be specified in a protocol agnostic way
  2. JSON - this means the examples will use the Document abstraction, but will not be validated by the smithy NodeValidationVisitor like the first type are. This type can be used to specify protocol specific examples
  3. STRING - this is just a string example and anything can be provided inside of the string. This can be helpful for showing e.g. xml or another encoding that isn't JSON and therefore doesn't fit nicely with Node semantics

Attributes

Graph
Supertypes
class Newtype[List[DataExample]]
trait HasId
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited classlikes

object hint

Attributes

Inherited from:
Newtype
Supertypes
class Object
trait Matchable
class Any

Inherited types

opaque type Type

Attributes

Inherited from:
Newtype

Value members

Inherited methods

def apply(a: List[DataExample]): Type

Attributes

Inherited from:
Newtype
def unapply(orig: Type): Some[A]

Attributes

Inherited from:
Newtype

Concrete fields

val hints: Hints
val id: ShapeId

Extensions

Inherited extensions

extension (orig: Type)
def value: A

Attributes

Inherited from:
Newtype

Implicits

Implicits

implicit val schema: Schema[DataExamples]

Inherited implicits

implicit val asBijection: Bijection[List[DataExample], Type]

Attributes

Inherited from:
Newtype
implicit val tag: ShapeTag[Type]

Attributes

Inherited from:
Newtype