json_schema v0.2.0 JsonSchema.Types.OneOfType View Source

Represents a custom oneOf type definition in a JSON schema.

JSON Schema:

"shape": {
  "oneOf": [
    {
      "$ref": "#/definitions/circle"
    },
    {
      "$ref": "#/definitions/rectangle"
    }
  ]
}

Resulting in the Elixir representation:

%OneOfType{name: "shape",
           path: URI.parse("#/shape"),
           types: [URI.parse("#/shape/oneOf/0"),
                   URI.parse("#/shape/oneOf/1")]}

Link to this section Summary

Link to this section Types

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

Link to this section Functions

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