json_schema v0.3.0 JsonSchema.Types.UnionType View Source

Represents a custom union type definition in a JSON schema.

JSON Schema:

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

Resulting in the Elixir representation:

%UnionType{name: "favoriteNumber",
           description: "Your favorite number",
           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{
  description: (String.t() | nil) | nil,
  name: String.t(),
  path: URI.t(),
  types: [String.t()]
}