Monorepo for Tangled tangled.org

lexicon: rework to avoid nested object types

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li ce510790 63bfc308

verified
Changed files
+85 -54
lexicons
+85 -54
lexicons/pipeline.json
··· 9 "key": "tid", 10 "record": { 11 "type": "object", 12 - "required": ["triggerMetadata", "workflows"], 13 "properties": { 14 "triggerMetadata": { 15 "type": "ref", ··· 27 }, 28 "triggerMetadata": { 29 "type": "object", 30 - "required": ["kind", "repo"], 31 "properties": { 32 "kind": { 33 "type": "string", 34 - "enum": ["push", "pull_request", "manual"] 35 }, 36 "repo": { 37 "type": "ref", ··· 53 }, 54 "triggerRepo": { 55 "type": "object", 56 - "required": ["knot", "did", "repo", "defaultBranch"], 57 "properties": { 58 "knot": { 59 "type": "string" ··· 72 }, 73 "pushTriggerData": { 74 "type": "object", 75 - "required": ["ref", "newSha", "oldSha"], 76 "properties": { 77 "ref": { 78 "type": "string" ··· 91 }, 92 "pullRequestTriggerData": { 93 "type": "object", 94 - "required": ["sourceBranch", "targetBranch", "sourceSha", "action"], 95 "properties": { 96 "sourceBranch": { 97 "type": "string" ··· 115 "inputs": { 116 "type": "array", 117 "items": { 118 - "type": "object", 119 - "required": ["key", "value"], 120 - "properties": { 121 - "key": { 122 - "type": "string" 123 - }, 124 - "value": { 125 - "type": "string" 126 - } 127 - } 128 } 129 } 130 } 131 }, 132 "workflow": { 133 "type": "object", 134 - "required": ["name", "dependencies", "steps", "environment", "clone"], 135 "properties": { 136 "name": { 137 "type": "string" 138 }, 139 "dependencies": { 140 - "type": "ref", 141 - "ref": "#dependencies" 142 }, 143 "steps": { 144 "type": "array", ··· 150 "environment": { 151 "type": "array", 152 "items": { 153 - "type": "object", 154 - "required": ["key", "value"], 155 - "properties": { 156 - "key": { 157 - "type": "string" 158 - }, 159 - "value": { 160 - "type": "string" 161 - } 162 - } 163 } 164 }, 165 "clone": { ··· 168 } 169 } 170 }, 171 - "dependencies": { 172 - "type": "array", 173 - "items": { 174 - "type": "object", 175 - "required": ["registry", "packages"], 176 - "properties": { 177 - "registry": { 178 "type": "string" 179 - }, 180 - "packages": { 181 - "type": "array", 182 - "items": { 183 - "type": "string" 184 - } 185 } 186 } 187 } 188 }, 189 "cloneOpts": { 190 "type": "object", 191 - "required": ["skip", "depth", "submodules"], 192 "properties": { 193 "skip": { 194 "type": "boolean" ··· 203 }, 204 "step": { 205 "type": "object", 206 - "required": ["name", "command"], 207 "properties": { 208 "name": { 209 "type": "string" ··· 214 "environment": { 215 "type": "array", 216 "items": { 217 - "type": "object", 218 - "required": ["key", "value"], 219 - "properties": { 220 - "key": { 221 - "type": "string" 222 - }, 223 - "value": { 224 - "type": "string" 225 - } 226 - } 227 } 228 } 229 } 230 }
··· 9 "key": "tid", 10 "record": { 11 "type": "object", 12 + "required": [ 13 + "triggerMetadata", 14 + "workflows" 15 + ], 16 "properties": { 17 "triggerMetadata": { 18 "type": "ref", ··· 30 }, 31 "triggerMetadata": { 32 "type": "object", 33 + "required": [ 34 + "kind", 35 + "repo" 36 + ], 37 "properties": { 38 "kind": { 39 "type": "string", 40 + "enum": [ 41 + "push", 42 + "pull_request", 43 + "manual" 44 + ] 45 }, 46 "repo": { 47 "type": "ref", ··· 63 }, 64 "triggerRepo": { 65 "type": "object", 66 + "required": [ 67 + "knot", 68 + "did", 69 + "repo", 70 + "defaultBranch" 71 + ], 72 "properties": { 73 "knot": { 74 "type": "string" ··· 87 }, 88 "pushTriggerData": { 89 "type": "object", 90 + "required": [ 91 + "ref", 92 + "newSha", 93 + "oldSha" 94 + ], 95 "properties": { 96 "ref": { 97 "type": "string" ··· 110 }, 111 "pullRequestTriggerData": { 112 "type": "object", 113 + "required": [ 114 + "sourceBranch", 115 + "targetBranch", 116 + "sourceSha", 117 + "action" 118 + ], 119 "properties": { 120 "sourceBranch": { 121 "type": "string" ··· 139 "inputs": { 140 "type": "array", 141 "items": { 142 + "type": "ref", 143 + "ref": "#pair" 144 } 145 } 146 } 147 }, 148 "workflow": { 149 "type": "object", 150 + "required": [ 151 + "name", 152 + "dependencies", 153 + "steps", 154 + "environment", 155 + "clone" 156 + ], 157 "properties": { 158 "name": { 159 "type": "string" 160 }, 161 "dependencies": { 162 + "type": "array", 163 + "items": { 164 + "type": "ref", 165 + "ref": "#dependency" 166 + } 167 }, 168 "steps": { 169 "type": "array", ··· 175 "environment": { 176 "type": "array", 177 "items": { 178 + "type": "ref", 179 + "ref": "#pair" 180 } 181 }, 182 "clone": { ··· 185 } 186 } 187 }, 188 + "dependency": { 189 + "type": "object", 190 + "required": [ 191 + "registry", 192 + "packages" 193 + ], 194 + "properties": { 195 + "registry": { 196 + "type": "string" 197 + }, 198 + "packages": { 199 + "type": "array", 200 + "items": { 201 "type": "string" 202 } 203 } 204 } 205 }, 206 "cloneOpts": { 207 "type": "object", 208 + "required": [ 209 + "skip", 210 + "depth", 211 + "submodules" 212 + ], 213 "properties": { 214 "skip": { 215 "type": "boolean" ··· 224 }, 225 "step": { 226 "type": "object", 227 + "required": [ 228 + "name", 229 + "command" 230 + ], 231 "properties": { 232 "name": { 233 "type": "string" ··· 238 "environment": { 239 "type": "array", 240 "items": { 241 + "type": "ref", 242 + "ref": "#pair" 243 } 244 + } 245 + } 246 + }, 247 + "pair": { 248 + "type": "object", 249 + "required": [ 250 + "key", 251 + "value" 252 + ], 253 + "properties": { 254 + "key": { 255 + "type": "string" 256 + }, 257 + "value": { 258 + "type": "string" 259 } 260 } 261 }