View Source JsonSchema.Types.PrimitiveType (json_schema v0.5.0)

Represents a custom primitive type definition in a JSON schema.

JSON Schema:

"name": {
  "description": "A name",
  "default": "Steve",
  "type": "string"
}

Resulting in the Elixir representation:

%PrimitiveType{name: "name",
               description: "A name",
               default: "Steve",
               path: URI.parse("#/name"),
               type: :string}

Link to this section Summary

Link to this section Types

@type default_value() :: boolean() | integer() | float() | binary()
@type t() :: %JsonSchema.Types.PrimitiveType{
  default: default_value(),
  description: String.t() | nil,
  name: String.t() | :anonymous,
  path: URI.t(),
  type: value_type()
}
@type value_type() :: :null | :boolean | :integer | :number | :string