Packages

final case class DynamicObjectSchema(properties: SchemaProperties[Map[String, JsonSchema[_]]] = DynamicObjectSchema.AllProperties)(implicit p: JsonoidParams) extends JsonSchema[Map[String, JsonSchema[_]]] with Product with Serializable

Represents objects in JSON Schema with dynamic keys.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DynamicObjectSchema
  2. Serializable
  3. Product
  4. Equals
  5. JsonSchema
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DynamicObjectSchema(properties: SchemaProperties[Map[String, JsonSchema[_]]] = DynamicObjectSchema.AllProperties)(implicit p: JsonoidParams)

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

    Definition Classes
    JsonSchema
    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

    Definition Classes
    JsonSchema
  8. def copy(properties: SchemaProperties[Map[String, JsonSchema[_]]]): DynamicObjectSchema

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

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

    Definition Classes
    DynamicObjectSchemaJsonSchema
    Annotations
    @SuppressWarnings()
  9. def copyWithReset()(implicit p: JsonoidParams): JsonSchema[Map[String, JsonSchema[_]]]

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

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

    Definition Classes
    JsonSchema
  10. def createProduct()(implicit p: JsonoidParams): PartialFunction[JsonSchema[_], JsonSchema[_]]

    A function which creates a new product schema.

    A function which creates a new product schema.

    Definition Classes
    JsonSchema
  11. val definitions: Map[String, JsonSchema[_]]

    A set of definitions used to express repeated structures.

    A set of definitions used to express repeated structures.

    Definition Classes
    JsonSchema
    Annotations
    @SuppressWarnings()
  12. 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

    Definition Classes
    JsonSchema
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  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

    Definition Classes
    JsonSchema
    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.

    Definition Classes
    DynamicObjectSchemaJsonSchema
  17. def findByPointer(pointer: JsonPointer): Option[JsonSchema[_]]

    Finda nested schema based on a JSON Pointer.

    Finda nested schema based on a JSON Pointer.

    Definition Classes
    DynamicObjectSchemaJsonSchema
    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

    Definition Classes
    JsonSchema
  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.

    Whether schemaType has any meaning for this schema class.

    Definition Classes
    JsonSchema
  21. 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

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

    Whether this schema either accepts all or no values.

    Whether this schema either accepts all or no values.

    Definition Classes
    JsonSchema
  24. def isNumeric: Boolean

    Whether this schema is numeric.

    Whether this schema is numeric.

    Definition Classes
    JsonSchema
  25. 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

    Definition Classes
    JsonSchema
    Annotations
    @SuppressWarnings()
  26. def isValidType[S <: JValue](value: S): Boolean

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

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

    Definition Classes
    JsonSchema
  27. 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

    Definition Classes
    JsonSchema
    Annotations
    @SuppressWarnings()
  28. 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

    Definition Classes
    JsonSchema
    Annotations
    @SuppressWarnings()
  29. def mergeSameType(mergeType: MergeType)(implicit p: JsonoidParams): PartialFunction[JsonSchema[_], JsonSchema[_]]

    Merge two schemas which are of the same basic type.

    Merge two schemas which are of the same basic type.

    Definition Classes
    DynamicObjectSchemaJsonSchema
  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[Map[String, JsonSchema[_]]]

    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

    Definition Classes
    JsonSchema
  34. def onlyPropertiesNamed(props: Seq[String]): JsonSchema[Map[String, JsonSchema[_]]]

    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

    Definition Classes
    JsonSchema
  35. def productElementNames: Iterator[String]
    Definition Classes
    Product
  36. val properties: SchemaProperties[Map[String, JsonSchema[_]]]

    A set of properties wh

    A set of properties wh

    Definition Classes
    DynamicObjectSchemaJsonSchema
  37. def replace(pointer: JsonPointer, replacer: (JsonSchema[_]) => JsonSchema[_])(implicit p: JsonoidParams): JsonSchema[_]
    Definition Classes
    DynamicObjectSchemaJsonSchema
    Annotations
    @SuppressWarnings()
  38. 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

    Definition Classes
    JsonSchema
  39. 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

    Definition Classes
    JsonSchema
  40. val schemaType: String

    A string representing the type of this schema.

    A string representing the type of this schema.

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

    Convert the schema to JSON Schema.

    Convert the schema to JSON Schema.

    Definition Classes
    JsonSchema
    Annotations
    @SuppressWarnings()
  43. def toJsonSchema()(implicit p: JsonoidParams): JObject

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

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

    Definition Classes
    JsonSchema
  44. 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

    Definition Classes
    JsonSchema
  45. 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

    Definition Classes
    JsonSchema
    Annotations
    @SuppressWarnings()
  46. val validTypes: Set[Class[_]]

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

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

    Definition Classes
    DynamicObjectSchemaJsonSchema
  47. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from JsonSchema[Map[String, JsonSchema[_]]]

Inherited from AnyRef

Inherited from Any

Ungrouped