Skip to content

Commit 69bbed1

Browse files
committed
Add policy post processor
1 parent 2f9e926 commit 69bbed1

File tree

10 files changed

+5
-60
lines changed

10 files changed

+5
-60
lines changed

generator/autogenlist.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { postProcessor as resourcesPostProcessor } from './processors/Microsoft.
44
import { postProcessor as machineLearningPostProcessor } from './processors/Microsoft.MachineLearning';
55
import { postProcessor as machineLearningServicesPostProcessor } from './processors/Microsoft.MachineLearningServices';
66
import { postProcessor as storageProcessor } from './processors/Microsoft.Storage';
7+
import { postProcessor as policyProcessor } from './processors/Microsoft.Authorization';
78
import { lowerCaseEquals } from './utils';
89

910
// Run "npm run list-basepaths" to discover all the valid readme files to add to this list
@@ -491,6 +492,7 @@ const autoGenList: AutoGenConfig[] = [
491492
scopes: ScopeType.Subcription | ScopeType.ResourceGroup | ScopeType.Extension,
492493
},
493494
],
495+
postProcessor: policyProcessor
494496
},
495497
{
496498
basePath: 'relay/resource-manager',

schemas/2016-12-01/Microsoft.Authorization.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@
140140
"description": "The display name of the policy assignment."
141141
},
142142
"parameters": {
143-
"type": "object",
144-
"properties": {},
145143
"description": "Required if a parameter is used in policy rule."
146144
},
147145
"policyDefinitionId": {
@@ -188,8 +186,6 @@
188186
"description": "The policy definition mode. Possible values are NotSpecified, Indexed, and All."
189187
},
190188
"parameters": {
191-
"type": "object",
192-
"properties": {},
193189
"description": "Required if a parameter is used in policy rule."
194190
},
195191
"policyRule": {

schemas/2017-06-01-preview/Microsoft.Authorization.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@
170170
"description": "The policy's excluded scopes."
171171
},
172172
"parameters": {
173-
"type": "object",
174-
"properties": {},
175173
"description": "Required if a parameter is used in policy rule."
176174
},
177175
"policyDefinitionId": {
@@ -189,8 +187,6 @@
189187
"type": "object",
190188
"properties": {
191189
"parameters": {
192-
"type": "object",
193-
"properties": {},
194190
"description": "Required if a parameter is used in policy rule."
195191
},
196192
"policyDefinitionId": {
@@ -217,8 +213,6 @@
217213
"description": "The policy set definition metadata."
218214
},
219215
"parameters": {
220-
"type": "object",
221-
"properties": {},
222216
"description": "The policy set definition parameters that can be used in policy definition references."
223217
},
224218
"policyDefinitions": {

schemas/2018-03-01/Microsoft.Authorization.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@
248248
"description": "The policy's excluded scopes."
249249
},
250250
"parameters": {
251-
"type": "object",
252-
"properties": {},
253251
"description": "Required if a parameter is used in policy rule."
254252
},
255253
"policyDefinitionId": {
@@ -296,8 +294,6 @@
296294
"description": "The policy definition mode. Possible values are NotSpecified, Indexed, and All."
297295
},
298296
"parameters": {
299-
"type": "object",
300-
"properties": {},
301297
"description": "Required if a parameter is used in policy rule."
302298
},
303299
"policyRule": {
@@ -328,8 +324,6 @@
328324
"type": "object",
329325
"properties": {
330326
"parameters": {
331-
"type": "object",
332-
"properties": {},
333327
"description": "Required if a parameter is used in policy rule."
334328
},
335329
"policyDefinitionId": {
@@ -356,8 +350,6 @@
356350
"description": "The policy set definition metadata."
357351
},
358352
"parameters": {
359-
"type": "object",
360-
"properties": {},
361353
"description": "The policy set definition parameters that can be used in policy definition references."
362354
},
363355
"policyDefinitions": {

schemas/2018-05-01/Microsoft.Authorization.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,6 @@
284284
"description": "The policy's excluded scopes."
285285
},
286286
"parameters": {
287-
"type": "object",
288-
"properties": {},
289287
"description": "Required if a parameter is used in policy rule."
290288
},
291289
"policyDefinitionId": {
@@ -332,8 +330,6 @@
332330
"description": "The policy definition mode. Possible values are NotSpecified, Indexed, and All."
333331
},
334332
"parameters": {
335-
"type": "object",
336-
"properties": {},
337333
"description": "Required if a parameter is used in policy rule."
338334
},
339335
"policyRule": {
@@ -364,8 +360,6 @@
364360
"type": "object",
365361
"properties": {
366362
"parameters": {
367-
"type": "object",
368-
"properties": {},
369363
"description": "Required if a parameter is used in policy rule."
370364
},
371365
"policyDefinitionId": {
@@ -392,8 +386,6 @@
392386
"description": "The policy set definition metadata."
393387
},
394388
"parameters": {
395-
"type": "object",
396-
"properties": {},
397389
"description": "The policy set definition parameters that can be used in policy definition references."
398390
},
399391
"policyDefinitions": {

schemas/2019-01-01/Microsoft.Authorization.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,6 @@
284284
"description": "The policy's excluded scopes."
285285
},
286286
"parameters": {
287-
"type": "object",
288-
"properties": {},
289287
"description": "Required if a parameter is used in policy rule."
290288
},
291289
"policyDefinitionId": {
@@ -320,8 +318,6 @@
320318
"description": "The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data."
321319
},
322320
"parameters": {
323-
"type": "object",
324-
"properties": {},
325321
"description": "Required if a parameter is used in policy rule."
326322
},
327323
"policyRule": {
@@ -352,8 +348,6 @@
352348
"type": "object",
353349
"properties": {
354350
"parameters": {
355-
"type": "object",
356-
"properties": {},
357351
"description": "Required if a parameter is used in policy rule."
358352
},
359353
"policyDefinitionId": {
@@ -380,8 +374,6 @@
380374
"description": "The policy set definition metadata."
381375
},
382376
"parameters": {
383-
"type": "object",
384-
"properties": {},
385377
"description": "The policy set definition parameters that can be used in policy definition references."
386378
},
387379
"policyDefinitions": {

schemas/2019-06-01/Microsoft.Authorization.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,6 @@
299299
"description": "The policy's excluded scopes."
300300
},
301301
"parameters": {
302-
"type": "object",
303-
"properties": {},
304302
"description": "Required if a parameter is used in policy rule."
305303
},
306304
"policyDefinitionId": {
@@ -335,8 +333,6 @@
335333
"description": "The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data."
336334
},
337335
"parameters": {
338-
"type": "object",
339-
"properties": {},
340336
"description": "Required if a parameter is used in policy rule."
341337
},
342338
"policyRule": {
@@ -367,8 +363,6 @@
367363
"type": "object",
368364
"properties": {
369365
"parameters": {
370-
"type": "object",
371-
"properties": {},
372366
"description": "Required if a parameter is used in policy rule."
373367
},
374368
"policyDefinitionId": {
@@ -395,8 +389,6 @@
395389
"description": "The policy set definition metadata."
396390
},
397391
"parameters": {
398-
"type": "object",
399-
"properties": {},
400392
"description": "The policy set definition parameters that can be used in policy definition references."
401393
},
402394
"policyDefinitions": {

schemas/2019-09-01/Microsoft.Authorization.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,7 @@
260260
"oneOf": [
261261
{
262262
"type": "array",
263-
"items": {
264-
"type": "object",
265-
"properties": {}
266-
}
263+
"items": {}
267264
},
268265
{
269266
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
@@ -272,8 +269,6 @@
272269
"description": "The allowed values for the parameter."
273270
},
274271
"defaultValue": {
275-
"type": "object",
276-
"properties": {},
277272
"description": "The default value for the parameter if no value is provided."
278273
},
279274
"metadata": {

schemas/2020-03-01/Microsoft.Authorization.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,7 @@
260260
"oneOf": [
261261
{
262262
"type": "array",
263-
"items": {
264-
"type": "object",
265-
"properties": {}
266-
}
263+
"items": {}
267264
},
268265
{
269266
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
@@ -272,8 +269,6 @@
272269
"description": "The allowed values for the parameter."
273270
},
274271
"defaultValue": {
275-
"type": "object",
276-
"properties": {},
277272
"description": "The default value for the parameter if no value is provided."
278273
},
279274
"metadata": {

schemas/2020-09-01/Microsoft.Authorization.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,7 @@
266266
"oneOf": [
267267
{
268268
"type": "array",
269-
"items": {
270-
"type": "object",
271-
"properties": {}
272-
}
269+
"items": {}
273270
},
274271
{
275272
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
@@ -278,8 +275,6 @@
278275
"description": "The allowed values for the parameter."
279276
},
280277
"defaultValue": {
281-
"type": "object",
282-
"properties": {},
283278
"description": "The default value for the parameter if no value is provided."
284279
},
285280
"metadata": {

0 commit comments

Comments
 (0)