View Source JsonSchema.Parser.SchemaResult (json_schema v0.5.0)

Represents the result of parsing a whole JSON schema including the parsed schema, along with all warnings and errors generated while parsing the schema and its members.

Link to this section Summary

Functions

Merges two SchemaResults and adds any collisions errors from merging their schema dictionaries to the list of errors in the merged SchemaResult.

Returns an empty SchemaResult.

Constructs a new SchemaResult. A SchemaResult consists of a schema dictionary corresponding to the succesfully parsed JSON schema files, and a list of warnings and errors encountered while parsing.

Link to this section Types

@type t() :: %JsonSchema.Parser.SchemaResult{
  errors: [{Path.t(), [JsonSchema.Parser.ParserError.t()]}],
  schema_dict: JsonSchema.Types.schemaDictionary(),
  warnings: [{Path.t(), [JsonSchema.Parser.ParserWarning.t()]}]
}

Link to this section Functions

Link to this function

merge(schema_result1, schema_result2)

View Source
@spec merge(t(), t()) :: t()

Merges two SchemaResults and adds any collisions errors from merging their schema dictionaries to the list of errors in the merged SchemaResult.

@spec new() :: t()

Returns an empty SchemaResult.

Link to this function

new(schema_dict, warnings \\ [], errors \\ [])

View Source

Constructs a new SchemaResult. A SchemaResult consists of a schema dictionary corresponding to the succesfully parsed JSON schema files, and a list of warnings and errors encountered while parsing.