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 may be numeric or string and **must** be unique within the
scope where they appear (e.g., source IDs within a single
compilation).
type:
- number
- string
examples:
# example: numeric 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 may be numeric or string and **must** be unique within the\nscope where they appear (e.g., source IDs within a single\ncompilation).\n",
"type": [
"number",
"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...