|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$comment": "Copyright (c) Microsoft Corporation. Licensed under the MIT license.", |
| 4 | + "$id": "https://github.com/Azure/apiops-cli/schemas/extractor-config.schema.json", |
| 5 | + "title": "APIOps Filter Configuration", |
| 6 | + "description": "Validates configuration.extractor.yaml files used by APIOps CLI to select which Azure API Management resources are extracted. All resource sections are optional.", |
| 7 | + "type": "object", |
| 8 | + "additionalProperties": false, |
| 9 | + "properties": { |
| 10 | + "$schema": { |
| 11 | + "type": "string", |
| 12 | + "description": "Optional schema URI for editor and IDE validation." |
| 13 | + }, |
| 14 | + "apis": { |
| 15 | + "type": "array", |
| 16 | + "description": "APIs to extract. Each item can be either a plain API name or wildcard pattern, or an object with a single API name mapped to nested API sub-filters. Matching is case-insensitive and supports * and ? wildcards.", |
| 17 | + "items": { |
| 18 | + "$ref": "#/definitions/apiSelector" |
| 19 | + } |
| 20 | + }, |
| 21 | + "backends": { |
| 22 | + "$ref": "#/definitions/resourcePatternArray", |
| 23 | + "description": "Backends to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 24 | + }, |
| 25 | + "products": { |
| 26 | + "$ref": "#/definitions/resourcePatternArray", |
| 27 | + "description": "Products to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 28 | + }, |
| 29 | + "namedValues": { |
| 30 | + "$ref": "#/definitions/resourcePatternArray", |
| 31 | + "description": "Named values to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 32 | + }, |
| 33 | + "loggers": { |
| 34 | + "$ref": "#/definitions/resourcePatternArray", |
| 35 | + "description": "Loggers to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 36 | + }, |
| 37 | + "diagnostics": { |
| 38 | + "$ref": "#/definitions/resourcePatternArray", |
| 39 | + "description": "Diagnostics to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 40 | + }, |
| 41 | + "tags": { |
| 42 | + "$ref": "#/definitions/resourcePatternArray", |
| 43 | + "description": "Tags to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 44 | + }, |
| 45 | + "policyFragments": { |
| 46 | + "$ref": "#/definitions/resourcePatternArray", |
| 47 | + "description": "Policy fragments to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 48 | + }, |
| 49 | + "gateways": { |
| 50 | + "$ref": "#/definitions/resourcePatternArray", |
| 51 | + "description": "Gateways to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 52 | + }, |
| 53 | + "versionSets": { |
| 54 | + "$ref": "#/definitions/resourcePatternArray", |
| 55 | + "description": "Version sets to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 56 | + }, |
| 57 | + "groups": { |
| 58 | + "$ref": "#/definitions/resourcePatternArray", |
| 59 | + "description": "Groups to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 60 | + }, |
| 61 | + "subscriptions": { |
| 62 | + "$ref": "#/definitions/resourcePatternArray", |
| 63 | + "description": "Subscriptions to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 64 | + }, |
| 65 | + "schemas": { |
| 66 | + "$ref": "#/definitions/resourcePatternArray", |
| 67 | + "description": "Schemas to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 68 | + }, |
| 69 | + "policies": { |
| 70 | + "$ref": "#/definitions/resourcePatternArray", |
| 71 | + "description": "Service-level policies to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 72 | + }, |
| 73 | + "policyRestrictions": { |
| 74 | + "$ref": "#/definitions/resourcePatternArray", |
| 75 | + "description": "Policy restrictions to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 76 | + }, |
| 77 | + "documentations": { |
| 78 | + "$ref": "#/definitions/resourcePatternArray", |
| 79 | + "description": "Documentations to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 80 | + }, |
| 81 | + "workspaces": { |
| 82 | + "type": "array", |
| 83 | + "description": "Workspaces to extract. Each item can be either a plain workspace name or wildcard pattern, or an object with a single workspace name mapped to nested workspace sub-filters. Matching is case-insensitive and supports * and ? wildcards.", |
| 84 | + "items": { |
| 85 | + "$ref": "#/definitions/workspaceSelector" |
| 86 | + } |
| 87 | + } |
| 88 | + }, |
| 89 | + "definitions": { |
| 90 | + "resourcePattern": { |
| 91 | + "type": "string", |
| 92 | + "description": "A resource name or wildcard pattern. Matching is case-insensitive. Supported wildcards: * matches zero or more characters, and ? matches a single character." |
| 93 | + }, |
| 94 | + "resourcePatternArray": { |
| 95 | + "type": "array", |
| 96 | + "description": "A list of resource names or wildcard patterns. Matching is case-insensitive. Supported wildcards: * and ?.", |
| 97 | + "items": { |
| 98 | + "$ref": "#/definitions/resourcePattern" |
| 99 | + } |
| 100 | + }, |
| 101 | + "apiSelector": { |
| 102 | + "oneOf": [ |
| 103 | + { |
| 104 | + "$ref": "#/definitions/resourcePattern" |
| 105 | + }, |
| 106 | + { |
| 107 | + "type": "object", |
| 108 | + "description": "A single API name mapped to sub-resource filters for that API.", |
| 109 | + "minProperties": 1, |
| 110 | + "maxProperties": 1, |
| 111 | + "patternProperties": { |
| 112 | + "^.+$": { |
| 113 | + "$ref": "#/definitions/apiSubFilter" |
| 114 | + } |
| 115 | + }, |
| 116 | + "additionalProperties": false |
| 117 | + } |
| 118 | + ] |
| 119 | + }, |
| 120 | + "workspaceSelector": { |
| 121 | + "oneOf": [ |
| 122 | + { |
| 123 | + "$ref": "#/definitions/resourcePattern" |
| 124 | + }, |
| 125 | + { |
| 126 | + "type": "object", |
| 127 | + "description": "A single workspace name mapped to sub-resource filters for that workspace.", |
| 128 | + "minProperties": 1, |
| 129 | + "maxProperties": 1, |
| 130 | + "patternProperties": { |
| 131 | + "^.+$": { |
| 132 | + "$ref": "#/definitions/workspaceSubFilter" |
| 133 | + } |
| 134 | + }, |
| 135 | + "additionalProperties": false |
| 136 | + } |
| 137 | + ] |
| 138 | + }, |
| 139 | + "apiSubFilter": { |
| 140 | + "type": "object", |
| 141 | + "description": "Sub-resource filters for a specific API. Omit a property to include all sub-resources of that type, or set it to an empty array to exclude all of that type. Matching is case-insensitive and supports * and ? wildcards.", |
| 142 | + "additionalProperties": false, |
| 143 | + "properties": { |
| 144 | + "operations": { |
| 145 | + "$ref": "#/definitions/resourcePatternArray", |
| 146 | + "description": "Operations to extract for this API. Matching is case-insensitive and supports * and ? wildcards." |
| 147 | + }, |
| 148 | + "diagnostics": { |
| 149 | + "$ref": "#/definitions/resourcePatternArray", |
| 150 | + "description": "Diagnostics to extract for this API. Matching is case-insensitive and supports * and ? wildcards." |
| 151 | + }, |
| 152 | + "schemas": { |
| 153 | + "$ref": "#/definitions/resourcePatternArray", |
| 154 | + "description": "Schemas to extract for this API. Matching is case-insensitive and supports * and ? wildcards." |
| 155 | + }, |
| 156 | + "releases": { |
| 157 | + "$ref": "#/definitions/resourcePatternArray", |
| 158 | + "description": "Releases to extract for this API. Matching is case-insensitive and supports * and ? wildcards." |
| 159 | + } |
| 160 | + } |
| 161 | + }, |
| 162 | + "workspaceSubFilter": { |
| 163 | + "type": "object", |
| 164 | + "description": "Sub-resource filters for a specific workspace. Omit a property to include all resources of that type, or set it to an empty array to exclude all of that type. Matching is case-insensitive and supports * and ? wildcards.", |
| 165 | + "additionalProperties": false, |
| 166 | + "properties": { |
| 167 | + "apis": { |
| 168 | + "type": "array", |
| 169 | + "description": "APIs within this workspace to extract. Each item can be either a plain API name or wildcard pattern, or an object with a single API name mapped to nested API sub-filters. Matching is case-insensitive and supports * and ? wildcards.", |
| 170 | + "items": { |
| 171 | + "$ref": "#/definitions/apiSelector" |
| 172 | + } |
| 173 | + }, |
| 174 | + "backends": { |
| 175 | + "$ref": "#/definitions/resourcePatternArray", |
| 176 | + "description": "Backends within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 177 | + }, |
| 178 | + "diagnostics": { |
| 179 | + "$ref": "#/definitions/resourcePatternArray", |
| 180 | + "description": "Diagnostics within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 181 | + }, |
| 182 | + "groups": { |
| 183 | + "$ref": "#/definitions/resourcePatternArray", |
| 184 | + "description": "Groups within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 185 | + }, |
| 186 | + "loggers": { |
| 187 | + "$ref": "#/definitions/resourcePatternArray", |
| 188 | + "description": "Loggers within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 189 | + }, |
| 190 | + "namedValues": { |
| 191 | + "$ref": "#/definitions/resourcePatternArray", |
| 192 | + "description": "Named values within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 193 | + }, |
| 194 | + "policyFragments": { |
| 195 | + "$ref": "#/definitions/resourcePatternArray", |
| 196 | + "description": "Policy fragments within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 197 | + }, |
| 198 | + "products": { |
| 199 | + "$ref": "#/definitions/resourcePatternArray", |
| 200 | + "description": "Products within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 201 | + }, |
| 202 | + "schemas": { |
| 203 | + "$ref": "#/definitions/resourcePatternArray", |
| 204 | + "description": "Schemas within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 205 | + }, |
| 206 | + "subscriptions": { |
| 207 | + "$ref": "#/definitions/resourcePatternArray", |
| 208 | + "description": "Subscriptions within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 209 | + }, |
| 210 | + "tags": { |
| 211 | + "$ref": "#/definitions/resourcePatternArray", |
| 212 | + "description": "Tags within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 213 | + }, |
| 214 | + "versionSets": { |
| 215 | + "$ref": "#/definitions/resourcePatternArray", |
| 216 | + "description": "Version sets within this workspace to extract. Matching is case-insensitive and supports * and ? wildcards." |
| 217 | + } |
| 218 | + } |
| 219 | + } |
| 220 | + } |
| 221 | +} |
0 commit comments