json_schema v0.2.0 JsonSchema.Parser.ErrorUtil View Source
Contains helper functions for reporting parser errors.
Link to this section Summary
Functions
Returns the name of the type of the given value
Link to this section Functions
Returns the name of the type of the given value.
Examples
iex> get_type([1,2,3])
"list"
iex> get_type(%{"type" => "string"})
"object"
iex> get_type("name")
"string"
iex> get_type(42)
"integer"
Link to this function
invalid_type(identifier, property, expected_type, actual_value)
View Source
invalid_type( JsonSchema.Types.typeIdentifier(), String.t(), String.t(), String.t() ) :: JsonSchema.Parser.ParserError.t()
Link to this function
invalid_uri(identifier, property, actual)
View Source
invalid_uri(JsonSchema.Types.typeIdentifier(), String.t(), String.t()) :: JsonSchema.Parser.ParserError.t()
Link to this function
missing_property(identifier, property)
View Source
missing_property(JsonSchema.Types.typeIdentifier(), String.t()) :: JsonSchema.Parser.ParserError.t()
Link to this function
name_collision(identifier)
View Source
name_collision(JsonSchema.Types.typeIdentifier()) :: JsonSchema.Parser.ParserError.t()
Link to this function
name_not_a_regex(identifier, property)
View Source
name_not_a_regex(JsonSchema.Types.typeIdentifier(), String.t()) :: JsonSchema.Parser.ParserError.t()
Link to this function
schema_name_collision(identifier)
View Source
schema_name_collision(JsonSchema.Types.typeIdentifier()) :: JsonSchema.Parser.ParserError.t()
Link to this function
unexpected_type(identifier, error_msg)
View Source
unexpected_type(JsonSchema.Types.typeIdentifier(), String.t()) :: JsonSchema.Parser.ParserError.t()
Link to this function
unknown_enum_type(type_name)
View Source
unknown_enum_type(String.t()) :: JsonSchema.Parser.ParserError.t()
Link to this function
unknown_node_type(identifier, name, schema_node)
View Source
unknown_node_type( JsonSchema.Types.typeIdentifier(), String.t(), JsonSchema.Types.schemaNode() ) :: JsonSchema.Parser.ParserError.t()
Link to this function
unknown_primitive_type(type_name)
View Source
unknown_primitive_type(String.t()) :: JsonSchema.Parser.ParserError.t()
Link to this function
unknown_type(type_name)
View Source
unknown_type(String.t()) :: JsonSchema.Parser.ParserError.t()
Link to this function
unresolved_reference(identifier, parent)
View Source
unresolved_reference(JsonSchema.Types.typeIdentifier(), URI.t()) :: JsonSchema.Parser.ParserError.t()
Link to this function
unsupported_schema_version(supplied_value, supported_versions)
View Source
unsupported_schema_version(String.t(), [String.t()]) :: JsonSchema.Parser.ParserError.t()