Identifiers and references
Identifier schema
This format defines a very loosely specified schema for external IDs.
- Explore
- View source
- Playground
Loading ....
- YAML
- JSON
ethdebug/format/materials/id
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/materials/id"
title: ethdebug/format/materials/id
description: |
An opaque identifier for a compilation resource (such as a source
file or a compilation itself), typically generated by the compiler.
Values are strings and **must** be unique within the scope where they
appear (e.g., source IDs within a single compilation). Producers whose
native identifiers are numeric (such as solc AST source indices)
stringify them when emitting this format.
type: string
examples:
# example: stringified source index
- "0"
# example: content-addressed compilation ID
- "__301f3b6d85831638"
ethdebug/format/materials/id
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/materials/id",
"title": "ethdebug/format/materials/id",
"description": "An opaque identifier for a compilation resource (such as a source\nfile or a compilation itself), typically generated by the compiler.\nValues are strings and **must** be unique within the scope where they\nappear (e.g., source IDs within a single compilation). Producers whose\nnative identifiers are numeric (such as solc AST source indices)\nstringify them when emitting this format.\n",
"type": "string",
"examples": [
"0",
"__301f3b6d85831638"
]
}
Loading playground...
Reference schema
This format defines a schema for referencing external resources by ID.
- Explore
- View source
- Playground
Loading ....
- YAML
- JSON
ethdebug/format/materials/reference
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "schema:ethdebug/format/materials/reference"
title: ethdebug/format/materials/reference
description: A reference to an external resource by ID
type: object
properties:
id:
$ref: "schema:ethdebug/format/materials/id"
type:
enum:
- compilation
- source
required: [id]
unevaluatedProperties: false
examples:
- id: "1"
ethdebug/format/materials/reference
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema:ethdebug/format/materials/reference",
"title": "ethdebug/format/materials/reference",
"description": "A reference to an external resource by ID",
"type": "object",
"properties": {
"id": {
"$ref": "schema:ethdebug/format/materials/id"
},
"type": {
"enum": [
"compilation",
"source"
]
}
},
"required": [
"id"
],
"unevaluatedProperties": false,
"examples": [
{
"id": "1"
}
]
}
Loading playground...