com.snowplowanalytics.iglu.schemaddl.jsonschema

SanityLinter

object SanityLinter

Contains Schema validation logic for JSON AST to find nonsense (impossible) JSON Schemas, ie. Schemas which cannot validate ANY value, yet syntactically correct. This doesn't have logic to validate accordance to JSON Schema specs such as non-empty required or numeric maximum. Separate validator should be used for that.

See also

https://github.com/snowplow/iglu/issues/164

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SanityLinter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type LintProperty = Validation[String, Unit]

    Check of single property

  2. type LintSchema = Validation[NonEmptyList[String], Unit]

    Aggregated property lints

  3. type Linter = (Schema) ⇒ LintProperty

    Function able to lint Schema AST

  4. trait SeverityLevel extends AnyRef

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object FirstLevel extends SeverityLevel with Product with Serializable

  7. object SecondLevel extends SeverityLevel with Product with Serializable

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def lint(schema: Schema, severityLevel: SeverityLevel): LintSchema

    Main working function, traversing JSON Schema It lints all properties on current level, then tries to extract all subschemas from properties like items, additionalItems etc and recursively lint them as well

    Main working function, traversing JSON Schema It lints all properties on current level, then tries to extract all subschemas from properties like items, additionalItems etc and recursively lint them as well

    schema

    parsed JSON AST

    returns

    non-empty list of summed failures (all, including nested) or unit in case of success

  17. val lintArrayProperties: (Schema) ⇒ LintProperty

    Check that Schema with non-object type doesn't contain object properties

  18. val lintMaxLength: (Schema) ⇒ LintProperty

    Check that schema with type string contains maxLength property or has other possibility to extract length

  19. val lintMinMaxItems: (Schema) ⇒ LintProperty

    Check that array's minItems property isn't greater than maxItems

  20. val lintMinMaxLength: (Schema) ⇒ LintProperty

    Check that string's minLength property isn't greater than maxLength

  21. val lintMinMaxPresent: (Schema) ⇒ LintProperty

    Check that schema with type number or integer contains both minimum and maximum properties

  22. val lintMinimumMaximum: (Schema) ⇒ LintProperty

    Check that number's minimum property isn't greater than maximum

  23. val lintNumberProperties: (Schema) ⇒ LintProperty

    Check that Schema with non-numeric type doesn't contain numeric properties

  24. val lintObjectProperties: (Schema) ⇒ LintProperty

    Check that Schema with non-object type doesn't contain object properties

  25. val lintPossibleKeys: (Schema) ⇒ LintProperty

    Check that all required keys listed in properties

    Check that all required keys listed in properties

    To do

    take patternProperties in account

  26. val lintStringProperties: (Schema) ⇒ LintProperty

    Check that Schema with non-string type doesn't contain string properties

  27. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  30. val propertySuccess: Validation[String, Unit]

    Some property was processed successfully

  31. val schemaSuccess: ValidationNel[String, Unit]

    Whole subschema was processed successfully

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped