View Source JsonSchema.Parser.OneOfParser (json_schema v0.5.0)
Parses a JSON schema oneOf type:
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "color": {
          "$ref": "#/color"
        },
        "title": {
          "type": "string"
        },
        "radius": {
          "type": "number"
        }
      },
      "required": [ "color", "radius" ]
    },
    {
      "type": "string"
    }
  ]
}Into an JsonSchema.Types.OneOfType.
Link to this section Summary
Functions
Parses a JSON schema oneOf type into an JsonSchema.Types.OneOfType.
Returns true if the json subschema represents an oneOf type.
Link to this section Functions
@spec parse(JsonSchema.Types.schemaNode(), URI.t(), URI.t(), URI.t(), String.t()) :: JsonSchema.Parser.ParserResult.t()
Parses a JSON schema oneOf type into an JsonSchema.Types.OneOfType.
@spec type?(JsonSchema.Types.schemaNode()) :: boolean()
Returns true if the json subschema represents an oneOf type.
  
  examples
  
  Examples
iex> type?(%{}) false
iex> type?(%{"oneOf" => []}) false
iex> type?(%{"oneOf" => [%{"$ref" => "#foo"}]}) true