Packages

trait JsonSchema[T] extends AnyRef

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonSchema
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def copy(properties: SchemaProperties[T]): JsonSchema[T]

    Create a copy of this schema with a new set of properties.

  2. abstract def mergeSameType(mergeType: MergeType = Union)(implicit p: JsonoidParams): PartialFunction[JsonSchema[_], JsonSchema[_]]

    Merge two schemas which are of the same basic type.

  3. abstract def properties: SchemaProperties[T]

    A set of properties wh

  4. abstract def schemaType: String

    A string representing the type of this schema.

  5. abstract def validTypes: Set[Class[_]]

    The set of valid types that can be contained in this schema.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addDefinition(definition: JsonSchema[_], name: String): Unit

    Add a new definition to the set of definitions.

    Add a new definition to the set of definitions.

    definition

    the new definition to add

    name

    the name of the definition

    Annotations
    @SuppressWarnings()
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def collectAnomalies[S <: JValue](value: S, path: String = "$")(implicit p: JsonoidParams, tag: ClassTag[S]): Seq[Anomaly]

    Produce a list of anomalies when validating a given value.

    Produce a list of anomalies when validating a given value.

    value

    the value to check for anomalies

    path

    the path where this anomaly is being checked

    returns

    a sequence of anomalies observed for this value

  8. def copyWithReset()(implicit p: JsonoidParams): JsonSchema[T]

    Create a copy of this schema with the same set of properties, but with each property set to their default value.

  9. def createProduct()(implicit p: JsonoidParams): PartialFunction[JsonSchema[_], JsonSchema[_]]

    A function which creates a new product schema.

  10. val definitions: Map[String, JsonSchema[_]]

    A set of definitions used to express repeated structures.

    A set of definitions used to express repeated structures.

    Annotations
    @SuppressWarnings()
  11. def entropy(implicit p: JsonoidParams): Option[Long]

    The number of possible types accepted by this schema.

    The number of possible types accepted by this schema. It must be overridden by subclasses to do anything useful.

    returns

    the number of types or None if entropy cannot be calculated

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def expandTo[S](other: Option[JsonSchema[S]]): JsonSchema[_]

    Expand this schema to be compatible with another schema if possible.

    Expand this schema to be compatible with another schema if possible.

    other

    the other schema to expand to

    returns

    a possibly expanded schema to be compatible with the other

    Annotations
    @SuppressWarnings()
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  16. def findByInexactPointer(pointer: JsonPointer): Seq[JsonSchema[_]]

    Find a nested schema based on an *inexact* JSON pointer.

    Find a nested schema based on an *inexact* JSON pointer. Inexact pointers do not include which array element is being used or which schema within a ProductSchema is being referenced.

    Annotations
    @SuppressWarnings()
  17. def findByPointer(pointer: JsonPointer): Option[JsonSchema[_]]

    Finda nested schema based on a JSON Pointer.

    Finda nested schema based on a JSON Pointer.

    Annotations
    @SuppressWarnings()
  18. def findIncompatibilities(other: JsonSchema[_], recursive: Boolean): Seq[ClassTag[_]]

    Find incompatibilities with this schema and another schema.

    Find incompatibilities with this schema and another schema.

    other

    the other schema to compare with

    recursive

    whether to recursively compare the schemas

    returns

    a sequence of properties which are incompatible

  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hasType: Boolean

    Whether schemaType has any meaning for this schema class.

  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def isAnomalous[S <: JValue](value: S, path: String = "$", level: AnomalyLevel = AnomalyLevel.Info)(implicit tag: ClassTag[S], p: JsonoidParams): Boolean

    Whether a value at a particular path is anomalous.

    Whether a value at a particular path is anomalous.

    value

    the value to check for anomalies

    path

    the path where this anomaly is being checked

    returns

    true if the value is anomalous, false otherwise

  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def isMaxMin: Boolean

    Whether this schema either accepts all or no values.

  25. def isNumeric: Boolean

    Whether this schema is numeric.

  26. def isSubsetOf(other: JsonSchema[_], recursive: Boolean = true)(implicit p: JsonoidParams): Boolean

    Check whether this schema is compatible with antoher schema.

    Check whether this schema is compatible with antoher schema.

    other

    the other schema to compare with

    recursive

    whether to recursively compare the schemas

    returns

    true if this schema is compatible with the other, false otherwise

    Annotations
    @SuppressWarnings()
  27. def isValidType[S <: JValue](value: S): Boolean

    Whether a given value is a valid type for this schema.

  28. def maxAnomalyLevel[S <: JValue](value: S, path: String = "$")(implicit tag: ClassTag[S], p: JsonoidParams): Option[AnomalyLevel]

    Whether a value at a particular path is anomalous.

    Whether a value at a particular path is anomalous.

    value

    the value to check for anomalies

    path

    the path where this anomaly is being checked

    returns

    true if the value is anomalous, false otherwise

    Annotations
    @SuppressWarnings()
  29. def merge(other: JsonSchema[_], mergeType: MergeType = Union)(implicit p: JsonoidParams): JsonSchema[_]

    Merge multiple schemas together.

    Merge multiple schemas together.

    other

    the schema to merge with

    mergeType

    the type of merge to perform

    returns

    the merged schema

    Annotations
    @SuppressWarnings()
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. def onlyProperties(props: Seq[Class[_]]): JsonSchema[T]

    Update a schema to only include a specific set of properties.

    Update a schema to only include a specific set of properties.

    props

    the properties to include

    returns

    a new schema with only the specified properties

  34. def onlyPropertiesNamed(props: Seq[String]): JsonSchema[T]

    Update a schema to only include a specific named set of properties.

    Update a schema to only include a specific named set of properties.

    props

    the names properties to include

    returns

    a new schema with only the specified properties

  35. def replace(pointer: JsonPointer, replacer: (JsonSchema[_]) => JsonSchema[_])(implicit p: JsonoidParams): JsonSchema[_]
  36. def replaceWithReference(pointer: JsonPointer, reference: String, obj: Option[JsonSchema[_]] = None)(implicit p: JsonoidParams): JsonSchema[_]

    Replace a schema at a particular pointer with a reference to another schema.

    Replace a schema at a particular pointer with a reference to another schema.

    pointer

    the JSON pointer to the schema to replace

    reference

    the reference to use in the new schema

    obj

    an optional object which represents the referenced schema

    returns

    a new schema with a reference

  37. def replaceWithSchema(pointer: JsonPointer, replaceSchema: JsonSchema[_])(implicit p: JsonoidParams): JsonSchema[_]

    Replace a schema at a particular pointer with a new schema.

    Replace a schema at a particular pointer with a new schema.

    pointer

    the JSON pointer to the schema to replace

    replaceSchema

    the schema to replace with

    returns

    a new schema with the referenced schema replaced

  38. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  39. def toJson()(implicit p: JsonoidParams): JObject

    Convert the schema to JSON Schema.

    Convert the schema to JSON Schema.

    Annotations
    @SuppressWarnings()
  40. def toJsonSchema()(implicit p: JsonoidParams): JObject

    Convert the schema to JSON Schema with the schema version specified.

  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. def transformProperties(transformer: PartialFunction[JsonSchema[_], JsonSchema[_]], transformBase: Boolean = false): JsonSchema[_]

    Transform all the properties in this schema and any nested schemas according to a specified function.

    Transform all the properties in this schema and any nested schemas according to a specified function.

    transformer

    the function to transform the properties

    transformBase

    whether to also transform this schema

    returns

    a new schema with transformed properties

  43. def transformPropertiesWithInexactPath(transformer: PartialFunction[(String, JsonSchema[_]), JsonSchema[_]], transformBase: Boolean = false, path: String = "$"): JsonSchema[_]

    A variant of transformProperties, which also provides the path to the transformer function.

    A variant of transformProperties, which also provides the path to the transformer function. This path is *inexact* in that it does not include which array element is being used or which schema within a ProductSchema is being referenced.

    transformer

    the function to transform the properties

    transformBase

    whether to also transform this schema

    path

    the base of the inexact path

    Annotations
    @SuppressWarnings()
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  45. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  46. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped