json_schema v0.1.0 JsonSchema.Parser.Util View Source
A module containing utility functions for JSON schema parsers.
Link to this section Summary
Functions
Creates a new type dictionary based on the given type definition and an optional ID
Returns a list of type paths when given a type dictionary
Parse a list of JSON schema objects that have a child relation to another
schema object with the specified parent_id
Link to this section Types
Link to this type
nodeParser()
View Source
nodeParser() :: (JsonSchema.Types.schemaNode(), URI.t(), URI.t(), JsonSchema.TypePath.t(), String.t() -> JsonSchema.Parser.ParserResult.t())
Link to this section Functions
Link to this function
create_type_dict(type_def, path, id)
View Source
create_type_dict( JsonSchema.Types.typeDefinition(), JsonSchema.TypePath.t(), URI.t() | nil ) :: JsonSchema.Types.typeDictionary()
Creates a new type dictionary based on the given type definition and an optional ID.
Link to this function
create_types_list(type_dict, path)
View Source
create_types_list(JsonSchema.Types.typeDictionary(), JsonSchema.TypePath.t()) :: [JsonSchema.TypePath.t()]
Returns a list of type paths when given a type dictionary.
Link to this function
parse_child_types(child_nodes, parent_id, path)
View Source
parse_child_types( [JsonSchema.Types.schemaNode()], URI.t(), JsonSchema.TypePath.t() ) :: JsonSchema.Parser.ParserResult.t()
Parse a list of JSON schema objects that have a child relation to another
schema object with the specified parent_id
.
Link to this function
parse_type(schema_node, parent_id, path, name)
View Source
parse_type( JsonSchema.Types.schemaNode(), URI.t(), JsonSchema.TypePath.t(), String.t() ) :: JsonSchema.Parser.ParserResult.t()