tuple
- Explore
- View source
- Playground
Loading ....
- YAML
- JSON
ethdebug/format/type/complex/tuple
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/type/complex/tuple"
title: ethdebug/format/type/complex/tuple
description:
Schema for representing tuple types
type: object
properties:
class:
type: string
const: complex
kind:
type: string
const: tuple
contains:
type: array
items:
$ref: "#/$defs/Element"
required:
- kind
- contains
examples:
- # empty tuple type
kind: tuple
contains: []
- kind: tuple
contains:
- name: x
type:
kind: uint
bits: 128
- name: y
type:
kind: uint
bits: 128
$defs:
Element:
type: object
title: Element
description:
An optionally named element type within a tuple. This is an
**ethdebug/format/type/wrapper** with additional fields.
allOf:
- $ref: "schema:ethdebug/format/type/wrapper"
- title: Additional fields
type: object
properties:
name:
type: string
description:
For tuple types where positional element types are identified
by name, this field **should** include this information.
This schema makes no restriction on whether all-or-no elements
have names, and so this field may be sparse across elements of
the same tuple.
ethdebug/format/type/complex/tuple
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/type/complex/tuple",
"title": "ethdebug/format/type/complex/tuple",
"description": "Schema for representing tuple types",
"type": "object",
"properties": {
"class": {
"type": "string",
"const": "complex"
},
"kind": {
"type": "string",
"const": "tuple"
},
"contains": {
"type": "array",
"items": {
"$ref": "#/$defs/Element"
}
}
},
"required": [
"kind",
"contains"
],
"examples": [
{
"kind": "tuple",
"contains": []
},
{
"kind": "tuple",
"contains": [
{
"name": "x",
"type": {
"kind": "uint",
"bits": 128
}
},
{
"name": "y",
"type": {
"kind": "uint",
"bits": 128
}
}
]
}
],
"$defs": {
"Element": {
"type": "object",
"title": "Element",
"description": "An optionally named element type within a tuple. This is an **ethdebug/format/type/wrapper** with additional fields.",
"allOf": [
{
"$ref": "schema:ethdebug/format/type/wrapper"
},
{
"title": "Additional fields",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "For tuple types where positional element types are identified by name, this field **should** include this information.\nThis schema makes no restriction on whether all-or-no elements have names, and so this field may be sparse across elements of the same tuple."
}
}
}
]
}
}
}
Loading...