|
| 1 | +{ |
| 2 | + "$id": "https://developer.microsoft.com/json-schemas/fabric/common/variableReference/1.0.0/schema.json", |
| 3 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 4 | + "definitions": { |
| 5 | + "VariableReference": { |
| 6 | + "description": "A reference to a variable. Format: $(<content>). The content inside the parentheses is validated by the semantic validator.", |
| 7 | + "$anchor": "VariableReference", |
| 8 | + "type": "string", |
| 9 | + "pattern": "^\\$\\(.+\\)$" |
| 10 | + }, |
| 11 | + "NotVariableReference": { |
| 12 | + "description": "Matches any value that is not a variable reference.", |
| 13 | + "not": { "type": "string", "pattern": "^\\$\\(.+\\)$" } |
| 14 | + }, |
| 15 | + "SchemaTypedVariableReference": { |
| 16 | + "description": "A reference to a variable, with expected type of the value to be specified by the parent schema via the varRef keyword.", |
| 17 | + "type": "string", |
| 18 | + "$anchor": "SchemaTypedVariableReference", |
| 19 | + "pattern": "^\\$\\(.+\\)$" |
| 20 | + }, |
| 21 | + "StringOrVar": { |
| 22 | + "description": "A String value or a reference to a variable of type String.", |
| 23 | + "oneOf": [ |
| 24 | + { |
| 25 | + "allOf": [ |
| 26 | + { "type": "string" }, |
| 27 | + { "$ref": "#/definitions/NotVariableReference" } |
| 28 | + ] |
| 29 | + }, |
| 30 | + { |
| 31 | + "allOf": [ |
| 32 | + { "$ref": "#/definitions/SchemaTypedVariableReference" }, |
| 33 | + { "varRef": { "type": "String" } } |
| 34 | + ] |
| 35 | + } |
| 36 | + ] |
| 37 | + }, |
| 38 | + "IntegerOrVar": { |
| 39 | + "description": "An Integer value or a reference to a variable of type Integer.", |
| 40 | + "oneOf": [ |
| 41 | + { "type": "integer" }, |
| 42 | + { |
| 43 | + "allOf": [ |
| 44 | + { "$ref": "#/definitions/SchemaTypedVariableReference" }, |
| 45 | + { "varRef": { "type": "Integer" } } |
| 46 | + ] |
| 47 | + } |
| 48 | + ] |
| 49 | + }, |
| 50 | + "NumberOrVar": { |
| 51 | + "description": "A Number value or a reference to a variable of type Number.", |
| 52 | + "oneOf": [ |
| 53 | + { "type": "number" }, |
| 54 | + { |
| 55 | + "allOf": [ |
| 56 | + { "$ref": "#/definitions/SchemaTypedVariableReference" }, |
| 57 | + { "varRef": { "type": "Number" } } |
| 58 | + ] |
| 59 | + } |
| 60 | + ] |
| 61 | + }, |
| 62 | + "BooleanOrVar": { |
| 63 | + "description": "A Boolean value or a reference to a variable of type Boolean.", |
| 64 | + "oneOf": [ |
| 65 | + { "type": "boolean" }, |
| 66 | + { |
| 67 | + "allOf": [ |
| 68 | + { "$ref": "#/definitions/SchemaTypedVariableReference" }, |
| 69 | + { "varRef": { "type": "Boolean" } } |
| 70 | + ] |
| 71 | + } |
| 72 | + ] |
| 73 | + }, |
| 74 | + "ValueOrVar": { |
| 75 | + "description": "Any JSON value, or a variable reference.", |
| 76 | + "oneOf": [ |
| 77 | + { "$ref": "#/definitions/NotVariableReference" }, |
| 78 | + { "$ref": "#/definitions/VariableReference" } |
| 79 | + ] |
| 80 | + } |
| 81 | + } |
| 82 | +} |
0 commit comments