Calculation spec

Calculation spec used by this schema object.

$defs.calculation_spec · object

Definition JSON

This fragment is shown exactly as published. Use the chevrons to fold objects and arrays; linked $ref values return to their targets in the complete schema.

{    "type": "object",
    "additionalProperties": false,
    "required": [        "expression",
        "input_names"    ],
    "properties": {        "expression": {            "type": "string",
            "minLength": 1        },
        "expression_language": {            "enum": [                "matjson_infix_0.1",
                "source_text",
                "other"            ]        },
        "input_names": {            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {                "type": "string",
                "pattern": "^[A-Za-z][A-Za-z0-9_]*$"            }        },
        "result_unit": {            "type": "string"        },
        "rounding": {            "$ref": "https://matjson.org/schema/core/0.1/schema.json#/$defs/rounding_rule"        },
        "source": {            "$ref": "https://matjson.org/schema/core/0.1/schema.json#/$defs/standard_reference"        }    }}

Fields

FieldTypeStatusMeaning
expressionstringRequiredA machine-readable Boolean or numeric expression.
expression_languageenum — "matjson_infix_0.1", "source_text", "other"OptionalExpression language used by this schema object.
input_namesarray — at least 1 item(s)RequiredInput names used by this schema object.
result_unitstringOptionalResult unit used by this schema object.
roundingRounding ruleOptionalRounding used by this schema object.
sourceStandard referenceOptionalReusable provenance for a requirement, value, evidence item, or result.