@stencila/schema
Version:
Stencila schema and other specifications
86 lines (85 loc) • 2.1 kB
JSON
{
"title": "CodeBlock",
"@id": "stencila:CodeBlock",
"role": "secondary",
"status": "stable",
"description": "A code block.",
"properties": {
"type": {
"description": "The name of the type and all descendant types.",
"type": "string",
"enum": [
"CodeBlock"
],
"default": "CodeBlock",
"from": "Thing"
},
"id": {
"description": "The identifier for this item.",
"type": "string",
"from": "Thing"
},
"alternateNames": {
"@id": "schema:alternateName",
"description": "Alternate names (aliases) for the item.",
"type": "array",
"items": {
"type": "string"
},
"from": "Thing",
"aliases": [
"alternateName"
]
},
"description": {
"@id": "schema:description",
"description": "A description of the item.",
"type": "string",
"from": "Thing"
},
"meta": {
"@id": "stencila:meta",
"description": "Metadata associated with this item.",
"type": "object",
"from": "Thing"
},
"name": {
"@id": "schema:name",
"description": "The name of the item.",
"type": "string",
"from": "Thing"
},
"url": {
"@id": "schema:url",
"description": "The URL of the item.",
"type": "string",
"format": "uri",
"from": "Thing"
},
"language": {
"@id": "schema:programmingLanguage",
"description": "The programming langauge of the code.",
"type": "string",
"from": "Code"
},
"value": {
"@id": "schema:value",
"description": "The text value.",
"type": "string",
"from": "Code"
}
},
"source": "https://github.com/stencila/schema/blob/master/schema/text/CodeBlock.schema.yaml",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://stencila.github.com/schema/CodeBlock.schema.json",
"category": "text",
"children": [],
"descendants": [],
"type": "object",
"additionalProperties": false,
"required": [
"type",
"value"
],
"parent": "Code"
}