1 | {
|
2 | "title": "Parameter",
|
3 | "@id": "stencila:Parameter",
|
4 | "extends": "Entity",
|
5 | "role": "secondary",
|
6 | "status": "experimental",
|
7 | "category": "code",
|
8 | "description": "A parameter of a document or function.",
|
9 | "properties": {
|
10 | "type": {
|
11 | "@id": "schema:type",
|
12 | "description": "The name of the type.",
|
13 | "type": "string",
|
14 | "enum": [
|
15 | "Parameter"
|
16 | ],
|
17 | "default": "Parameter",
|
18 | "from": "Entity"
|
19 | },
|
20 | "id": {
|
21 | "@id": "schema:id",
|
22 | "description": "The identifier for this item.",
|
23 | "type": "string",
|
24 | "from": "Entity"
|
25 | },
|
26 | "meta": {
|
27 | "@id": "stencila:meta",
|
28 | "description": "Metadata associated with this item.",
|
29 | "type": "object",
|
30 | "from": "Entity"
|
31 | },
|
32 | "name": {
|
33 | "@id": "schema:name",
|
34 | "description": "The name of the parameter.",
|
35 | "type": "string",
|
36 | "pattern": "[a-z_][A-z0-9_]*",
|
37 | "$comment": "This regex allows for snake_case and camelCase names but excludes\nPascalCase for names.\n",
|
38 | "from": "Parameter"
|
39 | },
|
40 | "value": {
|
41 | "@id": "schema:value",
|
42 | "description": "The current value of the parameter.",
|
43 | "allOf": [
|
44 | {
|
45 | "$ref": "Node.schema.json"
|
46 | }
|
47 | ],
|
48 | "from": "Parameter"
|
49 | },
|
50 | "default": {
|
51 | "@id": "schema:defaultValue",
|
52 | "description": "The default value of the parameter.",
|
53 | "allOf": [
|
54 | {
|
55 | "$ref": "Node.schema.json"
|
56 | }
|
57 | ],
|
58 | "from": "Parameter"
|
59 | },
|
60 | "validator": {
|
61 | "@id": "stencila:validator",
|
62 | "description": "The validator that the value is validated against.",
|
63 | "allOf": [
|
64 | {
|
65 | "$ref": "ValidatorTypes.schema.json"
|
66 | }
|
67 | ],
|
68 | "from": "Parameter"
|
69 | },
|
70 | "executeDigest": {
|
71 | "@id": "stencila:executeDigest",
|
72 | "description": "The SHA-256 digest of the `value` property the last time the node was executed.",
|
73 | "type": "string",
|
74 | "$comment": "Used to determine whether it is necessary to re-execute the node (i.e to assign a variable\nwithin the document session having `name` and `value`).\n",
|
75 | "from": "Parameter"
|
76 | },
|
77 | "isRequired": {
|
78 | "@id": "schema:valueRequired",
|
79 | "description": "Is this parameter required, if not it should have a default or default is assumed to be null.",
|
80 | "type": "boolean",
|
81 | "from": "Parameter"
|
82 | },
|
83 | "isVariadic": {
|
84 | "@id": "stencila:isVariadic",
|
85 | "description": "Indicates that this parameter is variadic and can accept multiple arguments.",
|
86 | "type": "boolean",
|
87 | "from": "Parameter"
|
88 | },
|
89 | "isExtensible": {
|
90 | "@id": "stencila:isExtensible",
|
91 | "description": "Indicates that this parameter is variadic and can accept multiple named arguments.",
|
92 | "type": "boolean",
|
93 | "from": "Parameter"
|
94 | }
|
95 | },
|
96 | "required": [
|
97 | "type",
|
98 | "name"
|
99 | ],
|
100 | "file": "Parameter.schema.yaml",
|
101 | "children": [],
|
102 | "descendants": [],
|
103 | "$schema": "http://json-schema.org/draft-07/schema#",
|
104 | "$id": "https://schema.stenci.la/v1/Parameter.schema.json",
|
105 | "source": "https://github.com/stencila/schema/blob/master/schema/Parameter.schema.yaml",
|
106 | "type": "object",
|
107 | "additionalProperties": false,
|
108 | "propertyAliases": {}
|
109 | }
|