View Source JsonSchema.Parser.ErrorUtil (json_schema v0.4.0)
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
@spec could_not_read_file(Path.t()) :: JsonSchema.Parser.ParserError.t()
Returns the name of the type of the given value.
examples
Examples
iex> get_type([1,2,3])
"list"
iex> get_type(%{"type" => "string"})
"object"
iex> get_type("name")
"string"
iex> get_type(42)
"integer"
@spec invalid_json(Path.t(), Jason.DecodeError.t()) :: JsonSchema.Parser.ParserError.t()
@spec invalid_type( JsonSchema.Types.typeIdentifier(), String.t(), String.t(), String.t() ) :: JsonSchema.Parser.ParserError.t()
@spec invalid_uri(JsonSchema.Types.typeIdentifier(), String.t(), String.t()) :: JsonSchema.Parser.ParserError.t()
@spec missing_property(JsonSchema.Types.typeIdentifier(), String.t()) :: JsonSchema.Parser.ParserError.t()
@spec name_collision(JsonSchema.Types.typeIdentifier()) :: JsonSchema.Parser.ParserError.t()
@spec name_not_a_regex(JsonSchema.Types.typeIdentifier(), String.t()) :: JsonSchema.Parser.ParserError.t()
@spec schema_name_collision(JsonSchema.Types.typeIdentifier()) :: JsonSchema.Parser.ParserError.t()
@spec unexpected_type(JsonSchema.Types.typeIdentifier(), String.t()) :: JsonSchema.Parser.ParserError.t()
@spec unknown_enum_type(String.t()) :: JsonSchema.Parser.ParserError.t()
@spec unknown_node_type( JsonSchema.Types.typeIdentifier(), String.t() | :anonymous, JsonSchema.Types.schemaNode() ) :: JsonSchema.Parser.ParserError.t()
@spec unknown_primitive_type(String.t()) :: JsonSchema.Parser.ParserError.t()
@spec unknown_type(String.t()) :: JsonSchema.Parser.ParserError.t()
@spec unknown_union_type(JsonSchema.Types.typeIdentifier(), String.t()) :: JsonSchema.Parser.ParserError.t()
@spec unresolved_reference(JsonSchema.Types.typeIdentifier(), URI.t()) :: JsonSchema.Parser.ParserError.t()
@spec unsupported_schema_version(String.t(), [String.t()]) :: JsonSchema.Parser.ParserError.t()