|
3 | 3 | "$id": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/plugin/sql.json",
|
4 | 4 | "title": "SQL plugin for Middleware Satellite",
|
5 | 5 | "description": "A Satellite is a micro-service aimed at managing data pipelines and data processing",
|
6 |
| - "type": "object", |
7 |
| - "additionalProperties": false, |
8 |
| - "properties": { |
9 |
| - "expression_language": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/definitions.json#/$defs/expression_language" } |
10 |
| - } |
| 6 | + "$defs": { |
| 7 | + "connection": { |
| 8 | + "type": "object", |
| 9 | + "properties": { |
| 10 | + "dsn": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" }, |
| 11 | + "username": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" }, |
| 12 | + "password": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" }, |
| 13 | + "persistent": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-boolean" }, |
| 14 | + "shared": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-boolean" } |
| 15 | + } |
| 16 | + }, |
| 17 | + "query-parameters": { |
| 18 | + "oneOf": [ |
| 19 | + { |
| 20 | + "type": "object", |
| 21 | + "patternProperties": { |
| 22 | + ".*": { |
| 23 | + "type": "object", |
| 24 | + "properties": { |
| 25 | + "oneOf": [ |
| 26 | + { |
| 27 | + "type": "object", |
| 28 | + "properties": { |
| 29 | + "value": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-any" } |
| 30 | + } |
| 31 | + }, |
| 32 | + { |
| 33 | + "type": "object", |
| 34 | + "properties": { |
| 35 | + "from": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/bundled-expression" } |
| 36 | + } |
| 37 | + } |
| 38 | + ] |
| 39 | + } |
| 40 | + } |
| 41 | + } |
| 42 | + }, |
| 43 | + { |
| 44 | + "type": "array", |
| 45 | + "items": { |
| 46 | + "type": "object", |
| 47 | + "properties": { |
| 48 | + "type": "object", |
| 49 | + "properties": { |
| 50 | + "value": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-any" } |
| 51 | + } |
| 52 | + } |
| 53 | + } |
| 54 | + } |
| 55 | + ] |
| 56 | + }, |
| 57 | + "query-list": { |
| 58 | + "type": "array", |
| 59 | + "items": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" } |
| 60 | + } |
| 61 | + }, |
| 62 | + "oneOf": [ |
| 63 | + { |
| 64 | + "type": "object", |
| 65 | + "additionalProperties": false, |
| 66 | + "properties": { |
| 67 | + "expression_language": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/definitions.json#/$defs/expression_language" }, |
| 68 | + "connection": { "$ref": "#/$defs/connection"}, |
| 69 | + "before": { "$ref": "#/$defs/query-list"}, |
| 70 | + "after": { "$ref": "#/$defs/query-list"}, |
| 71 | + "extractor": { |
| 72 | + "oneOf": [ |
| 73 | + { |
| 74 | + "type": "object", |
| 75 | + "properties": { |
| 76 | + "query": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" }, |
| 77 | + "parameters": { "$ref": "#/$defs/query-parameters"} |
| 78 | + } |
| 79 | + }, |
| 80 | + { |
| 81 | + "type": "object", |
| 82 | + "properties": { |
| 83 | + "conditional": { |
| 84 | + "type": "array", |
| 85 | + "items": { |
| 86 | + "type": "object", |
| 87 | + "properties": { |
| 88 | + "condition":{ "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/bundled-expression" }, |
| 89 | + "query": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" }, |
| 90 | + "parameters": { "$ref": "#/$defs/query-parameters"} |
| 91 | + } |
| 92 | + } |
| 93 | + } |
| 94 | + } |
| 95 | + } |
| 96 | + ] |
| 97 | + } |
| 98 | + } |
| 99 | + }, |
| 100 | + { |
| 101 | + "type": "object", |
| 102 | + "additionalProperties": false, |
| 103 | + "properties": { |
| 104 | + "expression_language": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/definitions.json#/$defs/expression_language" }, |
| 105 | + "connection": { "$ref": "#/$defs/connection"}, |
| 106 | + "before": { "$ref": "#/$defs/query-list"}, |
| 107 | + "after": { "$ref": "#/$defs/query-list"}, |
| 108 | + "lookup": { |
| 109 | + "oneOf": [ |
| 110 | + { |
| 111 | + "type": "object", |
| 112 | + "properties": { |
| 113 | + "query": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" }, |
| 114 | + "parameters": { "$ref": "#/$defs/query-parameters"}, |
| 115 | + "merge": { |
| 116 | + "oneOf": [ |
| 117 | + { |
| 118 | + "type": "object", |
| 119 | + "additionalProperties": false, |
| 120 | + "properties": { |
| 121 | + "map": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/plugin/fastmap.json#/$defs/fastmap-items" } |
| 122 | + } |
| 123 | + }, |
| 124 | + { |
| 125 | + "type": "object", |
| 126 | + "additionalProperties": false, |
| 127 | + "properties": { |
| 128 | + "object": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/plugin/fastmap.json#/$defs/fastmap-items" }, |
| 129 | + "class": { "type": "string" } |
| 130 | + } |
| 131 | + } |
| 132 | + ] |
| 133 | + } |
| 134 | + } |
| 135 | + }, |
| 136 | + { |
| 137 | + "type": "object", |
| 138 | + "properties": { |
| 139 | + "conditional": { |
| 140 | + "type": "array", |
| 141 | + "items": { |
| 142 | + "type": "object", |
| 143 | + "properties": { |
| 144 | + "condition":{ "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/bundled-expression" }, |
| 145 | + "query": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" }, |
| 146 | + "parameters": { "$ref": "#/$defs/query-parameters"}, |
| 147 | + "merge": { |
| 148 | + "oneOf": [ |
| 149 | + { |
| 150 | + "type": "object", |
| 151 | + "additionalProperties": false, |
| 152 | + "properties": { |
| 153 | + "map": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/plugin/fastmap.json#/$defs/fastmap-items" } |
| 154 | + } |
| 155 | + }, |
| 156 | + { |
| 157 | + "type": "object", |
| 158 | + "additionalProperties": false, |
| 159 | + "properties": { |
| 160 | + "object": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/plugin/fastmap.json#/$defs/fastmap-items" }, |
| 161 | + "class": { "type": "string" } |
| 162 | + } |
| 163 | + } |
| 164 | + ] |
| 165 | + } |
| 166 | + } |
| 167 | + } |
| 168 | + } |
| 169 | + } |
| 170 | + } |
| 171 | + ] |
| 172 | + } |
| 173 | + } |
| 174 | + }, |
| 175 | + { |
| 176 | + "type": "object", |
| 177 | + "additionalProperties": false, |
| 178 | + "properties": { |
| 179 | + "expression_language": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/definitions.json#/$defs/expression_language" }, |
| 180 | + "connection": { "$ref": "#/$defs/connection"}, |
| 181 | + "before": { "$ref": "#/$defs/query-list"}, |
| 182 | + "after": { "$ref": "#/$defs/query-list"}, |
| 183 | + "loader": { |
| 184 | + "oneOf": [ |
| 185 | + { |
| 186 | + "type": "object", |
| 187 | + "properties": { |
| 188 | + "query": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" }, |
| 189 | + "parameters": { "$ref": "#/$defs/query-parameters"} |
| 190 | + } |
| 191 | + }, |
| 192 | + { |
| 193 | + "type": "object", |
| 194 | + "properties": { |
| 195 | + "conditional": { |
| 196 | + "type": "array", |
| 197 | + "items": { |
| 198 | + "type": "object", |
| 199 | + "properties": { |
| 200 | + "condition":{ "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/bundled-expression" }, |
| 201 | + "query": { "$ref": "https://raw.githubusercontent.com/php-etl/satellite/master/schema/expressions.json#/$defs/expression-or-string" }, |
| 202 | + "parameters": { "$ref": "#/$defs/query-parameters"} |
| 203 | + } |
| 204 | + } |
| 205 | + } |
| 206 | + } |
| 207 | + } |
| 208 | + ] |
| 209 | + } |
| 210 | + } |
| 211 | + } |
| 212 | + ] |
11 | 213 | }
|
0 commit comments