Schema
Root schema
- Explore
- View source
- Playground
Loading ....
- YAML
- JSON
ethdebug/format/type
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/type"
title: ethdebug/format/type
description:
Canonical representation for all types.
type: object
if:
type: object
title: Known kind
description:
If `kind` adheres to the set of known kinds defined by this format
properties:
kind:
anyOf:
- $ref: "schema:ethdebug/format/type/elementary#/$defs/Kind"
- $ref: "schema:ethdebug/format/type/complex#/$defs/Kind"
then:
type: object
title: KnownType
description:
Then the object must adhere to exactly one known kind of type
allOf:
- if:
properties:
kind:
$ref: "schema:ethdebug/format/type/elementary#/$defs/Kind"
then:
$ref: "schema:ethdebug/format/type/elementary"
- if:
properties:
kind:
$ref: "schema:ethdebug/format/type/complex#/$defs/Kind"
then:
$ref: "schema:ethdebug/format/type/complex"
else:
type: object
description:
Else the object must be a valid **ethdebug/format/type/base** with
additional constraints
allOf:
- $ref: "schema:ethdebug/format/type/base"
- title: Required `class` field
required:
- class
- title: Specialized complex type `contains` field
type: object
if:
description:
If this object is a complex type
properties:
class:
const: complex
then:
description:
Then the `contains` field must adhere to
**ethdebug/format/type/wrapper** schemas, not the
**ethdebug/format/type/base** equivalent.
(i.e., these additional constraints must apply recursively)
properties:
contains:
oneOf:
- $ref: "schema:ethdebug/format/type/wrapper"
- $ref: "schema:ethdebug/format/type/wrapper#/$defs/Array"
- $ref: "schema:ethdebug/format/type/wrapper#/$defs/Object"
ethdebug/format/type
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/type",
"title": "ethdebug/format/type",
"description": "Canonical representation for all types.",
"type": "object",
"if": {
"type": "object",
"title": "Known kind",
"description": "If `kind` adheres to the set of known kinds defined by this format",
"properties": {
"kind": {
"anyOf": [
{
"$ref": "schema:ethdebug/format/type/elementary#/$defs/Kind"
},
{
"$ref": "schema:ethdebug/format/type/complex#/$defs/Kind"
}
]
}
}
},
"then": {
"type": "object",
"title": "KnownType",
"description": "Then the object must adhere to exactly one known kind of type",
"allOf": [
{
"if": {
"properties": {
"kind": {
"$ref": "schema:ethdebug/format/type/elementary#/$defs/Kind"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary"
}
},
{
"if": {
"properties": {
"kind": {
"$ref": "schema:ethdebug/format/type/complex#/$defs/Kind"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/complex"
}
}
]
},
"else": {
"type": "object",
"description": "Else the object must be a valid **ethdebug/format/type/base** with additional constraints",
"allOf": [
{
"$ref": "schema:ethdebug/format/type/base"
},
{
"title": "Required `class` field",
"required": [
"class"
]
},
{
"title": "Specialized complex type `contains` field",
"type": "object",
"if": {
"description": "If this object is a complex type",
"properties": {
"class": {
"const": "complex"
}
}
},
"then": {
"description": "Then the `contains` field must adhere to **ethdebug/format/type/wrapper** schemas, not the **ethdebug/format/type/base** equivalent.\n(i.e., these additional constraints must apply recursively)",
"properties": {
"contains": {
"oneOf": [
{
"$ref": "schema:ethdebug/format/type/wrapper"
},
{
"$ref": "schema:ethdebug/format/type/wrapper#/$defs/Array"
},
{
"$ref": "schema:ethdebug/format/type/wrapper#/$defs/Object"
}
]
}
}
}
}
]
}
}
Loading...
Elementary type schema
- Explore
- View source
- Playground
Loading ....
- YAML
- JSON
ethdebug/format/type/elementary
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/type/elementary"
title: ethdebug/format/type/elementary
description:
Canonical representation of an elementary type
type: object
properties:
kind:
$ref: "#/$defs/Kind"
required:
- kind
allOf:
- if:
properties:
kind:
const: uint
then:
$ref: "schema:ethdebug/format/type/elementary/uint"
- if:
properties:
kind:
const: int
then:
$ref: "schema:ethdebug/format/type/elementary/int"
- if:
properties:
kind:
const: bool
then:
$ref: "schema:ethdebug/format/type/elementary/bool"
- if:
properties:
kind:
const: bytes
then:
$ref: "schema:ethdebug/format/type/elementary/bytes"
- if:
properties:
kind:
const: string
then:
$ref: "schema:ethdebug/format/type/elementary/string"
- if:
properties:
kind:
const: ufixed
then:
$ref: "schema:ethdebug/format/type/elementary/ufixed"
- if:
properties:
kind:
const: fixed
then:
$ref: "schema:ethdebug/format/type/elementary/fixed"
- if:
properties:
kind:
const: address
then:
$ref: "schema:ethdebug/format/type/elementary/address"
- if:
properties:
kind:
const: contract
then:
$ref: "schema:ethdebug/format/type/elementary/contract"
- if:
properties:
kind:
const: enum
then:
$ref: "schema:ethdebug/format/type/elementary/enum"
$defs:
Kind:
title: Known elementary kind
description:
A schema for the values of `kind` reserved for known elementary types
included in ethdebug/format
type: string
enum:
- uint
- int
- bool
- bytes
- string
- ufixed
- fixed
- address
- contract
- enum
ethdebug/format/type/elementary
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/type/elementary",
"title": "ethdebug/format/type/elementary",
"description": "Canonical representation of an elementary type",
"type": "object",
"properties": {
"kind": {
"$ref": "#/$defs/Kind"
}
},
"required": [
"kind"
],
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "uint"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/uint"
}
},
{
"if": {
"properties": {
"kind": {
"const": "int"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/int"
}
},
{
"if": {
"properties": {
"kind": {
"const": "bool"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/bool"
}
},
{
"if": {
"properties": {
"kind": {
"const": "bytes"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/bytes"
}
},
{
"if": {
"properties": {
"kind": {
"const": "string"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/string"
}
},
{
"if": {
"properties": {
"kind": {
"const": "ufixed"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/ufixed"
}
},
{
"if": {
"properties": {
"kind": {
"const": "fixed"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/fixed"
}
},
{
"if": {
"properties": {
"kind": {
"const": "address"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/address"
}
},
{
"if": {
"properties": {
"kind": {
"const": "contract"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/contract"
}
},
{
"if": {
"properties": {
"kind": {
"const": "enum"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/elementary/enum"
}
}
],
"$defs": {
"Kind": {
"title": "Known elementary kind",
"description": "A schema for the values of `kind` reserved for known elementary types included in ethdebug/format",
"type": "string",
"enum": [
"uint",
"int",
"bool",
"bytes",
"string",
"ufixed",
"fixed",
"address",
"contract",
"enum"
]
}
}
}
Loading...
Complex type schema
- Explore
- View source
- Playground
Loading ....
- YAML
- JSON
ethdebug/format/type/complex
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/type/complex"
title: ethdebug/format/type/complex
description:
Canonical representation of a complex type
type: object
properties:
kind:
$ref: "#/$defs/Kind"
required:
- kind
allOf:
- if:
properties:
kind:
const: alias
then:
$ref: "schema:ethdebug/format/type/complex/alias"
- if:
properties:
kind:
const: tuple
then:
$ref: "schema:ethdebug/format/type/complex/tuple"
- if:
properties:
kind:
const: array
then:
$ref: "schema:ethdebug/format/type/complex/array"
- if:
properties:
kind:
const: mapping
then:
$ref: "schema:ethdebug/format/type/complex/mapping"
- if:
properties:
kind:
const: struct
then:
$ref: "schema:ethdebug/format/type/complex/struct"
- if:
properties:
kind:
const: function
then:
$ref: "schema:ethdebug/format/type/complex/function"
$defs:
Kind:
title: Known complex kind
description:
A schema for the values of `kind` reserved for known complex types
included in ethdebug/format
type: string
enum:
- alias
- tuple
- array
- mapping
- struct
- function
ethdebug/format/type/complex
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/type/complex",
"title": "ethdebug/format/type/complex",
"description": "Canonical representation of a complex type",
"type": "object",
"properties": {
"kind": {
"$ref": "#/$defs/Kind"
}
},
"required": [
"kind"
],
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "alias"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/complex/alias"
}
},
{
"if": {
"properties": {
"kind": {
"const": "tuple"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/complex/tuple"
}
},
{
"if": {
"properties": {
"kind": {
"const": "array"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/complex/array"
}
},
{
"if": {
"properties": {
"kind": {
"const": "mapping"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/complex/mapping"
}
},
{
"if": {
"properties": {
"kind": {
"const": "struct"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/complex/struct"
}
},
{
"if": {
"properties": {
"kind": {
"const": "function"
}
}
},
"then": {
"$ref": "schema:ethdebug/format/type/complex/function"
}
}
],
"$defs": {
"Kind": {
"title": "Known complex kind",
"description": "A schema for the values of `kind` reserved for known complex types included in ethdebug/format",
"type": "string",
"enum": [
"alias",
"tuple",
"array",
"mapping",
"struct",
"function"
]
}
}
}
Loading...