json_schema v0.2.0 JsonSchema.Types.UnionType View Source

Represents a custom union type definition in a JSON schema.

JSON Schema:

"favoriteNumber": {
  "type": ["number", "integer", "null"]
}

Resulting in the Elixir representation:

%UnionType{name: "favoriteNumber",
           path: URI.parse("#/favoriteNumber"),
           types: ["number", "integer", "null"]}

Link to this section Summary

Link to this section Types

Link to this type t() View Source
t() :: %JsonSchema.Types.UnionType{
  name: String.t(),
  path: URI.t(),
  types: [String.t()]
}

Link to this section Functions

Link to this function new(name, path, types) View Source
new(String.t(), URI.t(), [String.t()]) :: t()